From baa809b5097c93ee880d3907b4d6aabe08d64336 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Apr 2024 00:22:16 -0700 Subject: [PATCH] feat(all): auto-regenerate discovery clients (#2505) --- .../v1/androidenterprise-api.json | 4 +- androidenterprise/v1/androidenterprise-gen.go | 5 +- .../v1/androidmanagement-api.json | 4 +- androidmanagement/v1/androidmanagement-gen.go | 4 +- bigquery/v2/bigquery-api.json | 265 +- bigquery/v2/bigquery-gen.go | 697 +- .../v1/bigqueryconnection-api.json | 28 +- .../v1/bigqueryconnection-gen.go | 66 + compute/v0.alpha/compute-api.json | 95 +- compute/v0.alpha/compute-gen.go | 172 +- .../v1alpha/discoveryengine-api.json | 2189 +- .../v1alpha/discoveryengine-gen.go | 35369 +++++++++------- .../v1beta/discoveryengine-api.json | 4540 +- discoveryengine/v1beta/discoveryengine-gen.go | 28543 ++++++++----- 14 files changed, 44625 insertions(+), 27356 deletions(-) diff --git a/androidenterprise/v1/androidenterprise-api.json b/androidenterprise/v1/androidenterprise-api.json index e596d13a6ee..490b09d686e 100644 --- a/androidenterprise/v1/androidenterprise-api.json +++ b/androidenterprise/v1/androidenterprise-api.json @@ -2649,7 +2649,7 @@ } } }, - "revision": "20231113", + "revision": "20240331", "rootUrl": "https://androidenterprise.googleapis.com/", "schemas": { "Administrator": { @@ -4372,7 +4372,7 @@ "Unspecified. Defaults to AUTO_UPDATE_DEFAULT.", "The app is automatically updated with low priority to minimize the impact on the user. The app is updated when the following constraints are met: * The device is not actively used * The device is connected to an unmetered network * The device is charging The device is notified about a new update within 24 hours after it is published by the developer, after which the app is updated the next time the constraints above are met.", "The app is not automatically updated for a maximum of 90 days after the app becomes out of date. 90 days after the app becomes out of date, the latest available version is installed automatically with low priority (see AUTO_UPDATE_DEFAULT). After the app is updated it is not automatically updated again until 90 days after it becomes out of date again. The user can still manually update the app from the Play Store at any time.", - "The app is updated as soon as possible. No constraints are applied. The device is notified immediately about a new app update after it is published by the developer." + "The app is updated as soon as possible. No constraints are applied. The device is notified as soon as possible about a new app update after it is published by the developer." ], "type": "string" }, diff --git a/androidenterprise/v1/androidenterprise-gen.go b/androidenterprise/v1/androidenterprise-gen.go index 9f6328a990b..81db7266207 100644 --- a/androidenterprise/v1/androidenterprise-gen.go +++ b/androidenterprise/v1/androidenterprise-gen.go @@ -3201,8 +3201,9 @@ type ProductPolicy struct { // 90 days after it becomes out of date again. The user can still // manually update the app from the Play Store at any time. // "autoUpdateHighPriority" - The app is updated as soon as possible. - // No constraints are applied. The device is notified immediately about - // a new app update after it is published by the developer. + // No constraints are applied. The device is notified as soon as + // possible about a new app update after it is published by the + // developer. AutoUpdateMode string `json:"autoUpdateMode,omitempty"` // EnterpriseAuthenticationAppLinkConfigs: An authentication URL diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index 9273361782a..07e0dd78001 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1163,7 +1163,7 @@ } } }, - "revision": "20240321", + "revision": "20240325", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -5724,7 +5724,7 @@ }, "lostPhoneNumber": { "$ref": "UserFacingMessage", - "description": "The phone number displayed to the user when the device is in lost mode." + "description": "The phone number that will be called when the device is in lost mode and the call owner button is tapped." }, "lostStreetAddress": { "$ref": "UserFacingMessage", diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index c353adb6229..7077b7a3ab3 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -6900,8 +6900,8 @@ type StartLostModeParams struct { // the device is in lost mode. LostOrganization *UserFacingMessage `json:"lostOrganization,omitempty"` - // LostPhoneNumber: The phone number displayed to the user when the - // device is in lost mode. + // LostPhoneNumber: The phone number that will be called when the device + // is in lost mode and the call owner button is tapped. LostPhoneNumber *UserFacingMessage `json:"lostPhoneNumber,omitempty"` // LostStreetAddress: The street address displayed to the user when the diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 8aba411a256..226d09d1c59 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -1084,6 +1084,36 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, + "getIamPolicy": { + "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines/{routinesId}:getIamPolicy", + "httpMethod": "POST", + "id": "bigquery.routines.getIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/datasets/[^/]+/routines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "{+resource}:getIamPolicy", + "request": { + "$ref": "GetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/cloud-platform.read-only" + ] + }, "insert": { "description": "Creates a new routine in the dataset.", "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines", @@ -1178,6 +1208,35 @@ "https://www.googleapis.com/auth/cloud-platform.read-only" ] }, + "setIamPolicy": { + "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines/{routinesId}:setIamPolicy", + "httpMethod": "POST", + "id": "bigquery.routines.setIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + "location": "path", + "pattern": "^projects/[^/]+/datasets/[^/]+/routines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "{+resource}:setIamPolicy", + "request": { + "$ref": "SetIamPolicyRequest" + }, + "response": { + "$ref": "Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "update": { "description": "Updates information in an existing routine. The update method replaces the entire Routine resource.", "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines/{routinesId}", @@ -1844,7 +1903,7 @@ } } }, - "revision": "20240229", + "revision": "20240323", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { @@ -3104,6 +3163,10 @@ "readOnly": true, "type": "string" }, + "externalCatalogDatasetOptions": { + "$ref": "ExternalCatalogDatasetOptions", + "description": "Optional. Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset." + }, "externalDatasetReference": { "$ref": "ExternalDatasetReference", "description": "Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL." @@ -3349,6 +3412,42 @@ }, "type": "object" }, + "DifferentialPrivacyPolicy": { + "description": "Represents privacy policy associated with \"differential privacy\" method.", + "id": "DifferentialPrivacyPolicy", + "properties": { + "deltaBudget": { + "description": "Optional. The total delta budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of delta that is pre-defined by the contributor through the privacy policy delta_per_query field. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.", + "format": "double", + "type": "number" + }, + "deltaPerQuery": { + "description": "Optional. The delta value that is used per query. Delta represents the probability that any row will fail to be epsilon differentially private. Indicates the risk associated with exposing aggregate rows in the result of a query.", + "format": "double", + "type": "number" + }, + "epsilonBudget": { + "description": "Optional. The total epsilon budget for all queries against the privacy-protected view. Each subscriber query against this view charges the amount of epsilon they request in their query. If there is sufficient budget, then the subscriber query attempts to complete. It might still fail due to other reasons, in which case the charge is refunded. If there is insufficient budget the query is rejected. There might be multiple charge attempts if a single query references multiple views. In this case there must be sufficient budget for all charges or the query is rejected and charges are refunded in best effort. The budget does not have a refresh policy and can only be updated via ALTER VIEW or circumvented by creating a new view that can be queried with a fresh budget.", + "format": "double", + "type": "number" + }, + "maxEpsilonPerQuery": { + "description": "Optional. The maximum epsilon value that a query can consume. If the subscriber specifies epsilon as a parameter in a SELECT query, it must be less than or equal to this value. The epsilon parameter controls the amount of noise that is added to the groups — a higher epsilon means less noise.", + "format": "double", + "type": "number" + }, + "maxGroupsContributed": { + "description": "Optional. The maximum groups contributed value that is used per query. Represents the maximum number of groups to which each protected entity can contribute. Changing this value does not improve or worsen privacy. The best value for accuracy and utility depends on the query and data.", + "format": "int64", + "type": "string" + }, + "privacyUnitColumn": { + "description": "Optional. The privacy unit column associated with this policy. Differential privacy policies can only have one privacy unit column per data source object (table, view).", + "type": "string" + } + }, + "type": "object" + }, "DimensionalityReductionMetrics": { "description": "Model evaluation metrics for dimensionality reduction models.", "id": "DimensionalityReductionMetrics", @@ -3766,6 +3865,46 @@ }, "type": "object" }, + "ExternalCatalogDatasetOptions": { + "description": "Options defining open source compatible datasets living in the BigQuery catalog. Contains metadata of open source database, schema or namespace represented by the current dataset.", + "id": "ExternalCatalogDatasetOptions", + "properties": { + "defaultStorageLocationUri": { + "description": "Optional. The storage location URI for all tables in the dataset. Equivalent to hive metastore's database locationUri. Maximum length of 1024 characters.", + "type": "string" + }, + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map of key value pairs defining the parameters and properties of the open source schema. Maximum size of 2Mib.", + "type": "object" + } + }, + "type": "object" + }, + "ExternalCatalogTableOptions": { + "description": "Metadata about open source compatible table. The fields contained in these options correspond to hive metastore's table level properties.", + "id": "ExternalCatalogTableOptions", + "properties": { + "connectionId": { + "description": "Optional. The connection specifying the credentials to be used to read external storage, such as Azure Blob, Cloud Storage, or S3. The connection is needed to read the open source table from BigQuery Engine. The connection_id can have the form `..` or `projects//locations//connections/`.", + "type": "string" + }, + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A map of key value pairs defining the parameters and properties of the open source table. Corresponds with hive meta store table parameters. Maximum size of 4Mib.", + "type": "object" + }, + "storageDescriptor": { + "$ref": "StorageDescriptor", + "description": "Optional. A storage descriptor containing information about the physical storage of this table." + } + }, + "type": "object" + }, "ExternalDataConfiguration": { "id": "ExternalDataConfiguration", "properties": { @@ -5758,6 +5897,38 @@ }, "type": "object" }, + "JoinRestrictionPolicy": { + "description": "Represents privacy policy associated with \"join restrictions\". Join restriction gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view.", + "id": "JoinRestrictionPolicy", + "properties": { + "joinAllowedColumns": { + "description": "Optional. The only columns that joins are allowed on. This field is must be specified for join_conditions JOIN_ANY and JOIN_ALL and it cannot be set for JOIN_BLOCKED.", + "items": { + "type": "string" + }, + "type": "array" + }, + "joinCondition": { + "description": "Optional. Specifies if a join is required or not on queries for the view. Default is JOIN_CONDITION_UNSPECIFIED.", + "enum": [ + "JOIN_CONDITION_UNSPECIFIED", + "JOIN_ANY", + "JOIN_ALL", + "JOIN_NOT_REQUIRED", + "JOIN_BLOCKED" + ], + "enumDescriptions": [ + "A join is neither required nor restricted on any column. Default value.", + "A join is required on at least one of the specified columns.", + "A join is required on all specified columns.", + "A join is not required, but if present it is only permitted on 'join_allowed_columns'", + "Joins are blocked for all queries." + ], + "type": "string" + } + }, + "type": "object" + }, "JsonObject": { "additionalProperties": { "$ref": "JsonValue" @@ -6434,6 +6605,21 @@ }, "type": "object" }, + "PartitionSkew": { + "description": "Partition skew detailed information.", + "id": "PartitionSkew", + "properties": { + "skewSources": { + "description": "Output only. Source stages which produce skewed data.", + "items": { + "$ref": "SkewSource" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, "PartitionedColumn": { "description": "The partitioning column information.", "id": "PartitionedColumn", @@ -6555,6 +6741,14 @@ "aggregationThresholdPolicy": { "$ref": "AggregationThresholdPolicy", "description": "Optional. Policy used for aggregation thresholds." + }, + "differentialPrivacyPolicy": { + "$ref": "DifferentialPrivacyPolicy", + "description": "Optional. Policy used for differential privacy." + }, + "joinRestrictionPolicy": { + "$ref": "JoinRestrictionPolicy", + "description": "Optional. Join restriction policy is outside of the one of policies, since this policy can be set along with other policies. This policy gives data providers the ability to enforce joins on the 'join_allowed_columns' when data is queried from a privacy protected view." } }, "type": "object" @@ -7526,6 +7720,28 @@ }, "type": "object" }, + "SerDeInfo": { + "description": "Serializer and deserializer information.", + "id": "SerDeInfo", + "properties": { + "name": { + "description": "Optional. Name of the SerDe. The maximum length is 256 characters.", + "type": "string" + }, + "parameters": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Key-value pairs that define the initialization parameters for the serialization library. Maximum size 10 Kib.", + "type": "object" + }, + "serializationLibrary": { + "description": "Required. Specifies a fully-qualified class name of the serialization library that is responsible for the translation of data between table representation and the underlying low-level input and output format structures. The maximum length is 256 characters.", + "type": "string" + } + }, + "type": "object" + }, "SessionInfo": { "description": "[Preview] Information related to sessions.", "id": "SessionInfo", @@ -7554,6 +7770,19 @@ }, "type": "object" }, + "SkewSource": { + "description": "Details about source stages which produce skewed data.", + "id": "SkewSource", + "properties": { + "stageId": { + "description": "Output only. Stage id of the skew source stage.", + "format": "int64", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "SnapshotDefinition": { "description": "Information about base table and snapshot time of the snapshot.", "id": "SnapshotDefinition", @@ -7732,6 +7961,11 @@ "readOnly": true, "type": "boolean" }, + "partitionSkew": { + "$ref": "PartitionSkew", + "description": "Output only. Partition skew in the stage.", + "readOnly": true + }, "slotContention": { "description": "Output only. True if the stage has a slot contention issue.", "readOnly": true, @@ -7852,6 +8086,29 @@ }, "type": "object" }, + "StorageDescriptor": { + "description": "Contains information about how a table's data is stored and accessed by open source query engines.", + "id": "StorageDescriptor", + "properties": { + "inputFormat": { + "description": "Optional. Specifies the fully qualified class name of the InputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcInputFormat\"). The maximum length is 128 characters.", + "type": "string" + }, + "locationUri": { + "description": "Optional. The physical location of the table (e.g. 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or 'gs://spark-dataproc-data/pangea-data/*'). The maximum length is 2056 bytes.", + "type": "string" + }, + "outputFormat": { + "description": "Optional. Specifies the fully qualified class name of the OutputFormat (e.g. \"org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat\"). The maximum length is 128 characters.", + "type": "string" + }, + "serdeInfo": { + "$ref": "SerDeInfo", + "description": "Optional. Serializer and deserializer information." + } + }, + "type": "object" + }, "Streamingbuffer": { "id": "Streamingbuffer", "properties": { @@ -7972,6 +8229,10 @@ "format": "int64", "type": "string" }, + "externalCatalogTableOptions": { + "$ref": "ExternalCatalogTableOptions", + "description": "Optional. Options defining open source compatible table." + }, "externalDataConfiguration": { "$ref": "ExternalDataConfiguration", "description": "Optional. Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table." @@ -9760,7 +10021,7 @@ "id": "UndeleteDatasetRequest", "properties": { "deletionTime": { - "description": "Optional. The exact time when the dataset was deleted. If not specified, it will undelete the most recently deleted version.", + "description": "Optional. The exact time when the dataset was deleted. If not specified, the most recently deleted version is undeleted.", "format": "google-datetime", "type": "string" } diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index d7996ad0cdb..0e49c769bb6 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -2418,6 +2418,12 @@ type Dataset struct { // Etag: Output only. A hash of the resource. Etag string `json:"etag,omitempty"` + // ExternalCatalogDatasetOptions: Optional. Options defining open source + // compatible datasets living in the BigQuery catalog. Contains metadata + // of open source database, schema or namespace represented by the + // current dataset. + ExternalCatalogDatasetOptions *ExternalCatalogDatasetOptions `json:"externalCatalogDatasetOptions,omitempty"` + // ExternalDatasetReference: Optional. Reference to a read-only external // dataset defined in data catalogs outside of BigQuery. Filled out when // the dataset type is EXTERNAL. @@ -2869,6 +2875,106 @@ func (s *DestinationTableProperties) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// DifferentialPrivacyPolicy: Represents privacy policy associated with +// "differential privacy" method. +type DifferentialPrivacyPolicy struct { + // DeltaBudget: Optional. The total delta budget for all queries against + // the privacy-protected view. Each subscriber query against this view + // charges the amount of delta that is pre-defined by the contributor + // through the privacy policy delta_per_query field. If there is + // sufficient budget, then the subscriber query attempts to complete. It + // might still fail due to other reasons, in which case the charge is + // refunded. If there is insufficient budget the query is rejected. + // There might be multiple charge attempts if a single query references + // multiple views. In this case there must be sufficient budget for all + // charges or the query is rejected and charges are refunded in best + // effort. The budget does not have a refresh policy and can only be + // updated via ALTER VIEW or circumvented by creating a new view that + // can be queried with a fresh budget. + DeltaBudget float64 `json:"deltaBudget,omitempty"` + + // DeltaPerQuery: Optional. The delta value that is used per query. + // Delta represents the probability that any row will fail to be epsilon + // differentially private. Indicates the risk associated with exposing + // aggregate rows in the result of a query. + DeltaPerQuery float64 `json:"deltaPerQuery,omitempty"` + + // EpsilonBudget: Optional. The total epsilon budget for all queries + // against the privacy-protected view. Each subscriber query against + // this view charges the amount of epsilon they request in their query. + // If there is sufficient budget, then the subscriber query attempts to + // complete. It might still fail due to other reasons, in which case the + // charge is refunded. If there is insufficient budget the query is + // rejected. There might be multiple charge attempts if a single query + // references multiple views. In this case there must be sufficient + // budget for all charges or the query is rejected and charges are + // refunded in best effort. The budget does not have a refresh policy + // and can only be updated via ALTER VIEW or circumvented by creating a + // new view that can be queried with a fresh budget. + EpsilonBudget float64 `json:"epsilonBudget,omitempty"` + + // MaxEpsilonPerQuery: Optional. The maximum epsilon value that a query + // can consume. If the subscriber specifies epsilon as a parameter in a + // SELECT query, it must be less than or equal to this value. The + // epsilon parameter controls the amount of noise that is added to the + // groups — a higher epsilon means less noise. + MaxEpsilonPerQuery float64 `json:"maxEpsilonPerQuery,omitempty"` + + // MaxGroupsContributed: Optional. The maximum groups contributed value + // that is used per query. Represents the maximum number of groups to + // which each protected entity can contribute. Changing this value does + // not improve or worsen privacy. The best value for accuracy and + // utility depends on the query and data. + MaxGroupsContributed int64 `json:"maxGroupsContributed,omitempty,string"` + + // PrivacyUnitColumn: Optional. The privacy unit column associated with + // this policy. Differential privacy policies can only have one privacy + // unit column per data source object (table, view). + PrivacyUnitColumn string `json:"privacyUnitColumn,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeltaBudget") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeltaBudget") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *DifferentialPrivacyPolicy) MarshalJSON() ([]byte, error) { + type NoMethod DifferentialPrivacyPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *DifferentialPrivacyPolicy) UnmarshalJSON(data []byte) error { + type NoMethod DifferentialPrivacyPolicy + var s1 struct { + DeltaBudget gensupport.JSONFloat64 `json:"deltaBudget"` + DeltaPerQuery gensupport.JSONFloat64 `json:"deltaPerQuery"` + EpsilonBudget gensupport.JSONFloat64 `json:"epsilonBudget"` + MaxEpsilonPerQuery gensupport.JSONFloat64 `json:"maxEpsilonPerQuery"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.DeltaBudget = float64(s1.DeltaBudget) + s.DeltaPerQuery = float64(s1.DeltaPerQuery) + s.EpsilonBudget = float64(s1.EpsilonBudget) + s.MaxEpsilonPerQuery = float64(s1.MaxEpsilonPerQuery) + return nil +} + // DimensionalityReductionMetrics: Model evaluation metrics for // dimensionality reduction models. type DimensionalityReductionMetrics struct { @@ -3574,6 +3680,89 @@ func (s *Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ExternalCatalogDatasetOptions: Options defining open source +// compatible datasets living in the BigQuery catalog. Contains metadata +// of open source database, schema or namespace represented by the +// current dataset. +type ExternalCatalogDatasetOptions struct { + // DefaultStorageLocationUri: Optional. The storage location URI for all + // tables in the dataset. Equivalent to hive metastore's database + // locationUri. Maximum length of 1024 characters. + DefaultStorageLocationUri string `json:"defaultStorageLocationUri,omitempty"` + + // Parameters: Optional. A map of key value pairs defining the + // parameters and properties of the open source schema. Maximum size of + // 2Mib. + Parameters map[string]string `json:"parameters,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultStorageLocationUri") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "DefaultStorageLocationUri") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalCatalogDatasetOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExternalCatalogDatasetOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ExternalCatalogTableOptions: Metadata about open source compatible +// table. The fields contained in these options correspond to hive +// metastore's table level properties. +type ExternalCatalogTableOptions struct { + // ConnectionId: Optional. The connection specifying the credentials to + // be used to read external storage, such as Azure Blob, Cloud Storage, + // or S3. The connection is needed to read the open source table from + // BigQuery Engine. The connection_id can have the form `..` or + // `projects//locations//connections/`. + ConnectionId string `json:"connectionId,omitempty"` + + // Parameters: Optional. A map of key value pairs defining the + // parameters and properties of the open source table. Corresponds with + // hive meta store table parameters. Maximum size of 4Mib. + Parameters map[string]string `json:"parameters,omitempty"` + + // StorageDescriptor: Optional. A storage descriptor containing + // information about the physical storage of this table. + StorageDescriptor *StorageDescriptor `json:"storageDescriptor,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConnectionId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConnectionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *ExternalCatalogTableOptions) MarshalJSON() ([]byte, error) { + type NoMethod ExternalCatalogTableOptions + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type ExternalDataConfiguration struct { // Autodetect: Try to detect schema and format options automatically. // Any option specified explicitly will be honored. @@ -6561,6 +6750,54 @@ func (s *JobStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// JoinRestrictionPolicy: Represents privacy policy associated with +// "join restrictions". Join restriction gives data providers the +// ability to enforce joins on the 'join_allowed_columns' when data is +// queried from a privacy protected view. +type JoinRestrictionPolicy struct { + // JoinAllowedColumns: Optional. The only columns that joins are allowed + // on. This field is must be specified for join_conditions JOIN_ANY and + // JOIN_ALL and it cannot be set for JOIN_BLOCKED. + JoinAllowedColumns []string `json:"joinAllowedColumns,omitempty"` + + // JoinCondition: Optional. Specifies if a join is required or not on + // queries for the view. Default is JOIN_CONDITION_UNSPECIFIED. + // + // Possible values: + // "JOIN_CONDITION_UNSPECIFIED" - A join is neither required nor + // restricted on any column. Default value. + // "JOIN_ANY" - A join is required on at least one of the specified + // columns. + // "JOIN_ALL" - A join is required on all specified columns. + // "JOIN_NOT_REQUIRED" - A join is not required, but if present it is + // only permitted on 'join_allowed_columns' + // "JOIN_BLOCKED" - Joins are blocked for all queries. + JoinCondition string `json:"joinCondition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JoinAllowedColumns") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JoinAllowedColumns") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *JoinRestrictionPolicy) MarshalJSON() ([]byte, error) { + type NoMethod JoinRestrictionPolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // JsonOptions: Json Options for load and make external tables. type JsonOptions struct { // Encoding: Optional. The character encoding of the data. The supported @@ -7533,6 +7770,34 @@ func (s *ParquetOptions) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// PartitionSkew: Partition skew detailed information. +type PartitionSkew struct { + // SkewSources: Output only. Source stages which produce skewed data. + SkewSources []*SkewSource `json:"skewSources,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SkewSources") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SkewSources") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *PartitionSkew) MarshalJSON() ([]byte, error) { + type NoMethod PartitionSkew + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // PartitionedColumn: The partitioning column information. type PartitionedColumn struct { // Field: Output only. The name of the partition column. @@ -7816,6 +8081,17 @@ type PrivacyPolicy struct { // thresholds. AggregationThresholdPolicy *AggregationThresholdPolicy `json:"aggregationThresholdPolicy,omitempty"` + // DifferentialPrivacyPolicy: Optional. Policy used for differential + // privacy. + DifferentialPrivacyPolicy *DifferentialPrivacyPolicy `json:"differentialPrivacyPolicy,omitempty"` + + // JoinRestrictionPolicy: Optional. Join restriction policy is outside + // of the one of policies, since this policy can be set along with other + // policies. This policy gives data providers the ability to enforce + // joins on the 'join_allowed_columns' when data is queried from a + // privacy protected view. + JoinRestrictionPolicy *JoinRestrictionPolicy `json:"joinRestrictionPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. // "AggregationThresholdPolicy") to unconditionally include in API // requests. By default, fields with empty or default values are omitted @@ -9369,6 +9645,46 @@ func (s *SearchStatistics) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SerDeInfo: Serializer and deserializer information. +type SerDeInfo struct { + // Name: Optional. Name of the SerDe. The maximum length is 256 + // characters. + Name string `json:"name,omitempty"` + + // Parameters: Optional. Key-value pairs that define the initialization + // parameters for the serialization library. Maximum size 10 Kib. + Parameters map[string]string `json:"parameters,omitempty"` + + // SerializationLibrary: Required. Specifies a fully-qualified class + // name of the serialization library that is responsible for the + // translation of data between table representation and the underlying + // low-level input and output format structures. The maximum length is + // 256 characters. + SerializationLibrary string `json:"serializationLibrary,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SerDeInfo) MarshalJSON() ([]byte, error) { + type NoMethod SerDeInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SessionInfo: [Preview] Information related to sessions. type SessionInfo struct { // SessionId: Output only. The id of the session. @@ -9434,6 +9750,34 @@ func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// SkewSource: Details about source stages which produce skewed data. +type SkewSource struct { + // StageId: Output only. Stage id of the skew source stage. + StageId int64 `json:"stageId,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "StageId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "StageId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *SkewSource) MarshalJSON() ([]byte, error) { + type NoMethod SkewSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // SnapshotDefinition: Information about base table and snapshot time of // the snapshot. type SnapshotDefinition struct { @@ -9696,6 +10040,9 @@ type StagePerformanceStandaloneInsight struct { // insufficient shuffle quota. InsufficientShuffleQuota bool `json:"insufficientShuffleQuota,omitempty"` + // PartitionSkew: Output only. Partition skew in the stage. + PartitionSkew *PartitionSkew `json:"partitionSkew,omitempty"` + // SlotContention: Output only. True if the stage has a slot contention // issue. SlotContention bool `json:"slotContention,omitempty"` @@ -9892,6 +10239,53 @@ func (s *StandardSqlTableType) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// StorageDescriptor: Contains information about how a table's data is +// stored and accessed by open source query engines. +type StorageDescriptor struct { + // InputFormat: Optional. Specifies the fully qualified class name of + // the InputFormat (e.g. + // "org.apache.hadoop.hive.ql.io.orc.OrcInputFormat"). The maximum + // length is 128 characters. + InputFormat string `json:"inputFormat,omitempty"` + + // LocationUri: Optional. The physical location of the table (e.g. + // 'gs://spark-dataproc-data/pangea-data/case_sensitive/' or + // 'gs://spark-dataproc-data/pangea-data/*'). The maximum length is 2056 + // bytes. + LocationUri string `json:"locationUri,omitempty"` + + // OutputFormat: Optional. Specifies the fully qualified class name of + // the OutputFormat (e.g. + // "org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat"). The maximum + // length is 128 characters. + OutputFormat string `json:"outputFormat,omitempty"` + + // SerdeInfo: Optional. Serializer and deserializer information. + SerdeInfo *SerDeInfo `json:"serdeInfo,omitempty"` + + // ForceSendFields is a list of field names (e.g. "InputFormat") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "InputFormat") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *StorageDescriptor) MarshalJSON() ([]byte, error) { + type NoMethod StorageDescriptor + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + type Streamingbuffer struct { // EstimatedBytes: Output only. A lower-bound estimate of the number of // bytes currently in the streaming buffer. @@ -10056,6 +10450,10 @@ type Table struct { // tables. ExpirationTime int64 `json:"expirationTime,omitempty,string"` + // ExternalCatalogTableOptions: Optional. Options defining open source + // compatible table. + ExternalCatalogTableOptions *ExternalCatalogTableOptions `json:"externalCatalogTableOptions,omitempty"` + // ExternalDataConfiguration: Optional. Describes the data format, // location, and other properties of a table stored outside of BigQuery. // By defining these properties, the data source can then be queried as @@ -12175,7 +12573,7 @@ func (s *TransformColumn) MarshalJSON() ([]byte, error) { // UndeleteDatasetRequest: Request format for undeleting a dataset. type UndeleteDatasetRequest struct { // DeletionTime: Optional. The exact time when the dataset was deleted. - // If not specified, it will undelete the most recently deleted version. + // If not specified, the most recently deleted version is undeleted. DeletionTime string `json:"deletionTime,omitempty"` // ForceSendFields is a list of field names (e.g. "DeletionTime") to @@ -16278,6 +16676,155 @@ func (c *RoutinesGetCall) Do(opts ...googleapi.CallOption) (*Routine, error) { } +// method id "bigquery.routines.getIamPolicy": + +type RoutinesGetIamPolicyCall struct { + s *Service + resource string + getiampolicyrequest *GetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. Returns +// an empty policy if the resource exists and does not have a policy +// set. +// +// - resource: REQUIRED: The resource for which the policy is being +// requested. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *RoutinesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *RoutinesGetIamPolicyCall { + c := &RoutinesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.getiampolicyrequest = getiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutinesGetIamPolicyCall) Fields(s ...googleapi.Field) *RoutinesGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoutinesGetIamPolicyCall) Context(ctx context.Context) *RoutinesGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoutinesGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutinesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:getIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "bigquery.routines.getIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RoutinesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", + // "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines/{routinesId}:getIamPolicy", + // "httpMethod": "POST", + // "id": "bigquery.routines.getIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/datasets/[^/]+/routines/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{+resource}:getIamPolicy", + // "request": { + // "$ref": "GetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform", + // "https://www.googleapis.com/auth/cloud-platform.read-only" + // ] + // } + +} + // method id "bigquery.routines.insert": type RoutinesInsertCall struct { @@ -16672,6 +17219,154 @@ func (c *RoutinesListCall) Pages(ctx context.Context, f func(*ListRoutinesRespon } } +// method id "bigquery.routines.setIamPolicy": + +type RoutinesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified +// resource. Replaces any existing policy. Can return `NOT_FOUND`, +// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. +// +// - resource: REQUIRED: The resource for which the policy is being +// specified. See Resource names +// (https://cloud.google.com/apis/design/resource_names) for the +// appropriate value for this field. +func (r *RoutinesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *RoutinesSetIamPolicyCall { + c := &RoutinesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.setiampolicyrequest = setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutinesSetIamPolicyCall) Fields(s ...googleapi.Field) *RoutinesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *RoutinesSetIamPolicyCall) Context(ctx context.Context) *RoutinesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *RoutinesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RoutinesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "{+resource}:setIamPolicy") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "bigquery.routines.setIamPolicy" call. +// Exactly one of *Policy or error will be non-nil. Any non-2xx status +// code is an error. Response headers are in either +// *Policy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified +// was returned. +func (c *RoutinesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", + // "flatPath": "projects/{projectsId}/datasets/{datasetsId}/routines/{routinesId}:setIamPolicy", + // "httpMethod": "POST", + // "id": "bigquery.routines.setIamPolicy", + // "parameterOrder": [ + // "resource" + // ], + // "parameters": { + // "resource": { + // "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/datasets/[^/]+/routines/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{+resource}:setIamPolicy", + // "request": { + // "$ref": "SetIamPolicyRequest" + // }, + // "response": { + // "$ref": "Policy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/bigquery", + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "bigquery.routines.update": type RoutinesUpdateCall struct { diff --git a/bigqueryconnection/v1/bigqueryconnection-api.json b/bigqueryconnection/v1/bigqueryconnection-api.json index a5a27bcdea6..d1e827d8b9d 100644 --- a/bigqueryconnection/v1/bigqueryconnection-api.json +++ b/bigqueryconnection/v1/bigqueryconnection-api.json @@ -366,7 +366,7 @@ } } }, - "revision": "20240124", + "revision": "20240323", "rootUrl": "https://bigqueryconnection.googleapis.com/", "schemas": { "AuditConfig": { @@ -690,6 +690,10 @@ "endpoint": { "$ref": "ConnectorConfigurationEndpoint", "description": "Specifies how to reach the remote system this connection is pointing to." + }, + "network": { + "$ref": "ConnectorConfigurationNetwork", + "description": "Networking configuration." } }, "type": "object" @@ -716,6 +720,28 @@ }, "type": "object" }, + "ConnectorConfigurationNetwork": { + "description": "Network related configuration.", + "id": "ConnectorConfigurationNetwork", + "properties": { + "privateServiceConnect": { + "$ref": "ConnectorConfigurationPrivateServiceConnect", + "description": "Private Service Connect networking configuration." + } + }, + "type": "object" + }, + "ConnectorConfigurationPrivateServiceConnect": { + "description": "Private Service Connect configuration.", + "id": "ConnectorConfigurationPrivateServiceConnect", + "properties": { + "networkAttachment": { + "description": "Required. Network Attachment name in the format of `projects/{project}/regions/{region}/networkAttachments/{networkattachment}`.", + "type": "string" + } + }, + "type": "object" + }, "ConnectorConfigurationSecret": { "description": "Secret value parameter.", "id": "ConnectorConfigurationSecret", diff --git a/bigqueryconnection/v1/bigqueryconnection-gen.go b/bigqueryconnection/v1/bigqueryconnection-gen.go index 8b20e91f68c..7be1da7cdb9 100644 --- a/bigqueryconnection/v1/bigqueryconnection-gen.go +++ b/bigqueryconnection/v1/bigqueryconnection-gen.go @@ -804,6 +804,9 @@ type ConnectorConfiguration struct { // pointing to. Endpoint *ConnectorConfigurationEndpoint `json:"endpoint,omitempty"` + // Network: Networking configuration. + Network *ConnectorConfigurationNetwork `json:"network,omitempty"` + // ForceSendFields is a list of field names (e.g. "Authentication") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any @@ -887,6 +890,69 @@ func (s *ConnectorConfigurationEndpoint) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// ConnectorConfigurationNetwork: Network related configuration. +type ConnectorConfigurationNetwork struct { + // PrivateServiceConnect: Private Service Connect networking + // configuration. + PrivateServiceConnect *ConnectorConfigurationPrivateServiceConnect `json:"privateServiceConnect,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "PrivateServiceConnect") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PrivateServiceConnect") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ConnectorConfigurationNetwork) MarshalJSON() ([]byte, error) { + type NoMethod ConnectorConfigurationNetwork + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// ConnectorConfigurationPrivateServiceConnect: Private Service Connect +// configuration. +type ConnectorConfigurationPrivateServiceConnect struct { + // NetworkAttachment: Required. Network Attachment name in the format of + // `projects/{project}/regions/{region}/networkAttachments/{networkattach + // ment}`. + NetworkAttachment string `json:"networkAttachment,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NetworkAttachment") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NetworkAttachment") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *ConnectorConfigurationPrivateServiceConnect) MarshalJSON() ([]byte, error) { + type NoMethod ConnectorConfigurationPrivateServiceConnect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // ConnectorConfigurationSecret: Secret value parameter. type ConnectorConfigurationSecret struct { // Plaintext: Input only. Secret as plaintext. diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 21e0300bb25..9295bf4d0dd 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -44323,7 +44323,7 @@ } } }, - "revision": "20240324", + "revision": "20240326", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -63576,6 +63576,10 @@ "description": "Administrative status of the interconnect. When this is set to true, the Interconnect is functional and can carry traffic. When set to false, no packets can be carried over the interconnect and no BGP routes are exchanged over it. By default, the status is set to true.", "type": "boolean" }, + "applicationAwareInterconnect": { + "$ref": "InterconnectApplicationAwareInterconnect", + "description": "Configuration for enabling Application Aware Interconnect (AAI) on this Cloud Interconnect connection between Google and your on-premises router." + }, "availableFeatures": { "description": "[Output only] List of features available for this Interconnect connection, which can take one of the following values: - MACSEC If present then the Interconnect connection is provisioned on MACsec capable hardware ports. If not present then the Interconnect connection is provisioned on non-MACsec capable ports and MACsec isn't supported and enabling MACsec fails.", "items": { @@ -63774,6 +63778,78 @@ }, "type": "object" }, + "InterconnectApplicationAwareInterconnect": { + "description": "Configuration information for enabling Application Aware Interconnect (AAI) on this Cloud Interconnect connection between Google and your on-premises router.", + "id": "InterconnectApplicationAwareInterconnect", + "properties": { + "bandwidthPercentagePolicy": { + "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy" + }, + "enabled": { + "description": "Enable or disable the AAI feature on this interconnect.", + "type": "boolean" + }, + "profileDescription": { + "description": "A description for the AAI profile on this interconnect.", + "type": "string" + }, + "strictPriorityPolicy": { + "$ref": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy" + } + }, + "type": "object" + }, + "InterconnectApplicationAwareInterconnectBandwidthPercentage": { + "description": "Specify bandwidth percentages (0-100) for various traffic classes in BandwidthPercentagePolicy. The sum of all percentages must equal 100. It is valid to specify percentages for some classes and not for others. The others will be implicitly marked as 0.", + "id": "InterconnectApplicationAwareInterconnectBandwidthPercentage", + "properties": { + "percentage": { + "description": "Bandwidth percentage for a specific traffic class.", + "format": "uint32", + "type": "integer" + }, + "trafficClass": { + "description": "TrafficClass whose bandwidth percentage is being specified.", + "enum": [ + "TC1", + "TC2", + "TC3", + "TC4", + "TC5", + "TC6" + ], + "enumDescriptions": [ + "Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx.", + "Traffic Class 2, corresponding to DSCP ranges (8-15) 001xxx.", + "Traffic Class 3, corresponding to DSCP ranges (16-23) 010xxx.", + "Traffic Class 4, corresponding to DSCP ranges (24-31) 011xxx.", + "Traffic Class 5, corresponding to DSCP ranges (32-47) 10xxxx.", + "Traffic Class 6, corresponding to DSCP ranges (48-63) 11xxxx." + ], + "type": "string" + } + }, + "type": "object" + }, + "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy": { + "id": "InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy", + "properties": { + "bandwidthPercentages": { + "description": "Specify bandwidth percentages for various traffic classes for queuing type Bandwidth Percent.", + "items": { + "$ref": "InterconnectApplicationAwareInterconnectBandwidthPercentage" + }, + "type": "array" + } + }, + "type": "object" + }, + "InterconnectApplicationAwareInterconnectStrictPriorityPolicy": { + "description": "Specify configuration for StrictPriorityPolicy.", + "id": "InterconnectApplicationAwareInterconnectStrictPriorityPolicy", + "properties": {}, + "type": "object" + }, "InterconnectAttachment": { "description": "Represents an Interconnect Attachment (VLAN) resource. You can use Interconnect attachments (VLANS) to connect your Virtual Private Cloud networks to your on-premises networks through an Interconnect. For more information, read Creating VLAN Attachments.", "id": "InterconnectAttachment", @@ -75327,15 +75403,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -79752,6 +79828,11 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "priority": { + "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", + "format": "int32", + "type": "integer" + }, "rules": { "description": "The rules that apply to the network.", "items": { @@ -79765,9 +79846,13 @@ "HIERARCHY", "NETWORK", "NETWORK_REGIONAL", + "SYSTEM_GLOBAL", + "SYSTEM_REGIONAL", "UNSPECIFIED" ], "enumDescriptions": [ + "", + "", "", "", "", @@ -96186,7 +96271,7 @@ "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect , or defaultRouteAction.weightedBackendService must be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index 22b3f198c37..7a858acb062 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -29601,6 +29601,11 @@ type Interconnect struct { // set to true. AdminEnabled bool `json:"adminEnabled,omitempty"` + // ApplicationAwareInterconnect: Configuration for enabling Application + // Aware Interconnect (AAI) on this Cloud Interconnect connection + // between Google and your on-premises router. + ApplicationAwareInterconnect *InterconnectApplicationAwareInterconnect `json:"applicationAwareInterconnect,omitempty"` + // AvailableFeatures: [Output only] List of features available for this // Interconnect connection, which can take one of the following values: // - MACSEC If present then the Interconnect connection is provisioned @@ -29827,6 +29832,130 @@ func (s *Interconnect) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// InterconnectApplicationAwareInterconnect: Configuration information +// for enabling Application Aware Interconnect (AAI) on this Cloud +// Interconnect connection between Google and your on-premises router. +type InterconnectApplicationAwareInterconnect struct { + BandwidthPercentagePolicy *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy `json:"bandwidthPercentagePolicy,omitempty"` + + // Enabled: Enable or disable the AAI feature on this interconnect. + Enabled bool `json:"enabled,omitempty"` + + // ProfileDescription: A description for the AAI profile on this + // interconnect. + ProfileDescription string `json:"profileDescription,omitempty"` + + StrictPriorityPolicy *InterconnectApplicationAwareInterconnectStrictPriorityPolicy `json:"strictPriorityPolicy,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BandwidthPercentagePolicy") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "BandwidthPercentagePolicy") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectApplicationAwareInterconnect) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectApplicationAwareInterconnect + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectApplicationAwareInterconnectBandwidthPercentage: Specify +// bandwidth percentages (0-100) for various traffic classes in +// BandwidthPercentagePolicy. The sum of all percentages must equal 100. +// It is valid to specify percentages for some classes and not for +// others. The others will be implicitly marked as 0. +type InterconnectApplicationAwareInterconnectBandwidthPercentage struct { + // Percentage: Bandwidth percentage for a specific traffic class. + Percentage int64 `json:"percentage,omitempty"` + + // TrafficClass: TrafficClass whose bandwidth percentage is being + // specified. + // + // Possible values: + // "TC1" - Traffic Class 1, corresponding to DSCP ranges (0-7) 000xxx. + // "TC2" - Traffic Class 2, corresponding to DSCP ranges (8-15) + // 001xxx. + // "TC3" - Traffic Class 3, corresponding to DSCP ranges (16-23) + // 010xxx. + // "TC4" - Traffic Class 4, corresponding to DSCP ranges (24-31) + // 011xxx. + // "TC5" - Traffic Class 5, corresponding to DSCP ranges (32-47) + // 10xxxx. + // "TC6" - Traffic Class 6, corresponding to DSCP ranges (48-63) + // 11xxxx. + TrafficClass string `json:"trafficClass,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Percentage") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Percentage") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectApplicationAwareInterconnectBandwidthPercentage) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentage + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy struct { + // BandwidthPercentages: Specify bandwidth percentages for various + // traffic classes for queuing type Bandwidth Percent. + BandwidthPercentages []*InterconnectApplicationAwareInterconnectBandwidthPercentage `json:"bandwidthPercentages,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "BandwidthPercentages") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BandwidthPercentages") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectApplicationAwareInterconnectBandwidthPercentagePolicy + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// InterconnectApplicationAwareInterconnectStrictPriorityPolicy: Specify +// configuration for StrictPriorityPolicy. +type InterconnectApplicationAwareInterconnectStrictPriorityPolicy struct { +} + // InterconnectAttachment: Represents an Interconnect Attachment (VLAN) // resource. You can use Interconnect attachments (VLANS) to connect // your Virtual Private Cloud networks to your on-premises networks @@ -45449,10 +45578,12 @@ type PathMatcher struct { // before forwarding the request to the selected backend. If // defaultRouteAction specifies any weightedBackendServices, // defaultService must not be set. Conversely if defaultService is set, - // defaultRouteAction cannot contain any weightedBackendServices. Only - // one of defaultRouteAction or defaultUrlRedirect must be set. URL maps - // for classic Application Load Balancers only support the urlRewrite - // action within a path matcher's defaultRouteAction. + // defaultRouteAction cannot contain any weightedBackendServices. If + // defaultRouteAction is specified, don't set defaultUrlRedirect. If + // defaultRouteAction.weightedBackendServices is specified, don't set + // defaultService. URL maps for classic Application Load Balancers only + // support the urlRewrite action within a path matcher's + // defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService @@ -45467,19 +45598,19 @@ type PathMatcher struct { // effect before sending the request to the backend. However, if // defaultService is specified, defaultRouteAction cannot contain any // weightedBackendServices. Conversely, if defaultRouteAction specifies - // any weightedBackendServices, defaultService must not be specified. - // Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. Authorization - // requires one or more of the following Google IAM permissions on the - // specified resource default_service: - compute.backendBuckets.use - - // compute.backendServices.use + // any weightedBackendServices, defaultService must not be specified. If + // defaultService is specified, then set either defaultUrlRedirect or + // defaultRouteAction.weightedBackendService. Don't set both. + // Authorization requires one or more of the following Google IAM + // permissions on the specified resource default_service: - + // compute.backendBuckets.use - compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or // routeRules match, the request is redirected to a URL specified by - // defaultUrlRedirect. If defaultUrlRedirect is specified, - // defaultService or defaultRouteAction must not be set. Not supported - // when the URL map is bound to a target gRPC proxy. + // defaultUrlRedirect. If defaultUrlRedirect is specified, then set + // either defaultService or defaultRouteAction. Don't set both. Not + // supported when the URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this @@ -51523,6 +51654,10 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // Priority: [Output only] Priority of firewall policy association. Not + // applicable for type=HIERARCHY. + Priority int64 `json:"priority,omitempty"` + // Rules: The rules that apply to the network. Rules []*FirewallPolicyRule `json:"rules,omitempty"` @@ -51533,6 +51668,8 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall // "HIERARCHY" // "NETWORK" // "NETWORK_REGIONAL" + // "SYSTEM_GLOBAL" + // "SYSTEM_REGIONAL" // "UNSPECIFIED" Type string `json:"type,omitempty"` @@ -74021,10 +74158,11 @@ type UrlMap struct { // backend. However, if defaultService is specified, defaultRouteAction // cannot contain any weightedBackendServices. Conversely, if // routeAction specifies any weightedBackendServices, service must not - // be specified. Only one of defaultService, defaultUrlRedirect , or - // defaultRouteAction.weightedBackendService must be set. defaultService - // has no effect when the URL map is bound to a target gRPC proxy that - // has the validateForProxyless field set to true. + // be specified. If defaultService is specified, then set either + // defaultUrlRedirect , or defaultRouteAction.weightedBackendService + // Don't set both. defaultService has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field + // set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index 2da3716be62..6c3c10291f1 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -1684,6 +1684,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", @@ -1837,6 +1865,199 @@ } } }, + "sessions": { + "methods": { + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sessions", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.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` * `session_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 `ListSessions` 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/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "siteSearchEngine": { "methods": { "batchVerifyTargetSites": { @@ -3006,6 +3227,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", @@ -3158,70 +3407,263 @@ ] } } - } - } - }, - "operations": { - "methods": { - "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1alpha/{+name}", - "response": { - "$ref": "GoogleLongrunningOperation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] }, - "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1alpha/{+name}/operations", + "sessions": { + "methods": { + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.sessions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sessions", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.engines.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.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` * `session_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 `ListSessions` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}/operations", "response": { "$ref": "GoogleLongrunningListOperationsResponse" }, @@ -4433,6 +4875,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", @@ -4586,39 +5056,232 @@ } } }, - "siteSearchEngine": { + "sessions": { "methods": { - "disableAdvancedSiteSearch": { - "description": "Downgrade from advanced site search to basic site search.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", "httpMethod": "POST", - "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + "id": "discoveryengine.projects.locations.dataStores.sessions.create", "parameterOrder": [ - "siteSearchEngine" + "parent" ], "parameters": { - "siteSearchEngine": { - "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" } }, - "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", + "path": "v1alpha/{+parent}/sessions", "request": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "enableAdvancedSiteSearch": { - "description": "Upgrade from basic site search to advanced site search.", - "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.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` * `session_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 `ListSessions` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "siteSearchEngine": { + "methods": { + "disableAdvancedSiteSearch": { + "description": "Downgrade from advanced site search to basic site search.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + "parameterOrder": [ + "siteSearchEngine" + ], + "parameters": { + "siteSearchEngine": { + "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enableAdvancedSiteSearch": { + "description": "Upgrade from basic site search to advanced site search.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", "httpMethod": "POST", "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch", "parameterOrder": [ @@ -5041,6 +5704,71 @@ } } }, + "evaluations": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.evaluations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "groundingConfigs": { + "methods": { + "check": { + "description": "Performs a grounding check.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/groundingConfigs/{groundingConfigsId}:check", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.groundingConfigs.check", + "parameterOrder": [ + "groundingConfig" + ], + "parameters": { + "groundingConfig": { + "description": "Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groundingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+groundingConfig}:check", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "get": { @@ -5218,7 +5946,7 @@ } } }, - "revision": "20240329", + "revision": "20240401", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5928,6 +6656,11 @@ "format": "int64", "type": "string" }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6264,93 +6997,881 @@ ], "type": "string" }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, + "updateTime": { + "description": "Output only. The target site's last updated time.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "properties": { + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "properties": { + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "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" + }, + "GoogleCloudDiscoveryengineV1alphaAclConfig": { + "description": "Access Control Configuration.", + "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "properties": { + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Identity provider config." + }, + "name": { + "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAdditionalParams": { + "description": "AdditionalParams message for WidgetService methods for security and privacy enhancement.", + "id": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "properties": { + "token": { + "description": "Token that used for non-human user check.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswer": { + "description": "Defines an answer.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswer", + "properties": { + "answerSkippedReasons": { + "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", + "items": { + "enum": [ + "ANSWER_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_ANSWER_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION" + ], + "enumDescriptions": [ + "Default value. The answer skipped reason is not specified.", + "The adversarial query ignored case.", + "The non-answer seeking query ignored case.", + "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", + "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic." + ], + "type": "string" + }, + "type": "array" + }, + "answerText": { + "description": "The textual answer.", + "type": "string" + }, + "citations": { + "description": "Citations.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" + }, + "type": "array" + }, + "completeTime": { + "description": "Output only. Answer completed timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. Answer creation timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", + "type": "string" + }, + "queryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "description": "Query understanding information." + }, + "references": { + "description": "References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" + }, + "type": "array" + }, + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "The state of the answer generation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Answer generation is currently in progress.", + "Answer generation currently failed.", + "Answer generation has succeeded." + ], + "type": "string" + }, + "steps": { + "description": "Answer generation steps.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", + "properties": { + "endIndex": { + "description": "End of the attributed segment, exclusive.", + "format": "int64", + "type": "string" + }, + "sources": { + "description": "Citation sources for the attributed segment.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", + "properties": { + "referenceId": { + "description": "ID of the citation source.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": { + "description": "Request message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest", + "properties": { + "answerGenerationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", + "description": "Answer generation specification." + }, + "asynchronousMode": { + "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "type": "boolean" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "Required. Current user query." + }, + "queryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", + "description": "Query understanding specification." + }, + "relatedQuestionsSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", + "description": "Related questions specification." + }, + "safetySpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", + "description": "Model specification." + }, + "searchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", + "description": "Search specification." + }, + "session": { + "description": "The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol “-” as session id. A new id will be automatically generated and assigned.", + "type": "string" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec": { + "description": "Answer generation specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec", + "properties": { + "answerLanguageCode": { + "description": "Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", + "type": "string" + }, + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreNonAnswerSeekingQuery": { + "description": "Specifies whether to filter out queries that are not answer-seeking. The default value is `false`. Google employs search-query classification to detect answer-seeking queries. No answer is returned if the search query is classified as a non-answer seeking query. If this field is set to `true`, we skip generating answers for non-answer seeking queries and return fallback messages instead.", + "type": "boolean" + }, + "includeCitations": { + "description": "Specifies whether to include citation metadata in the answer. The default value is `false`.", + "type": "boolean" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", + "description": "Answer generation model specification." + }, + "promptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", + "description": "Answer generation prompt specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec": { + "description": "Answer Generation Model specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec", + "properties": { + "modelVersion": { + "description": "Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec": { + "description": "Answer generation prompt specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec", + "properties": { + "preamble": { + "description": "Customized preamble.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec": { + "description": "Query understanding specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec", + "properties": { + "queryClassificationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "description": "Query classification specification." + }, + "queryRephraserSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "description": "Query rephraser specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec": { + "description": "Query classification specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "properties": { + "types": { + "description": "Enabled query classification types.", + "items": { + "enum": [ + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" + ], + "enumDescriptions": [ + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec": { + "description": "Query rephraser specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "properties": { + "disable": { + "description": "Disable query rephraser.", + "type": "boolean" + }, + "maxRephraseSteps": { + "description": "Max rephrase steps. The max number is 10 steps. If not set or set to \u003c 1, it will be set to 1 by default.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec": { + "description": "Related questions specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec", + "properties": { + "enable": { + "description": "Enable related questions feature if true.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": { + "description": "Safety specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", + "properties": { + "enable": { + "description": "Enable the safety filtering on the answer response. It is false by default.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec": { + "description": "Search specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec", + "properties": { + "searchParams": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", + "description": "Search parameters." + }, + "searchResultList": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", + "description": "Search result list." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams": { + "description": "Search parameters.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams", + "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Boost specification to boost certain documents in search results which may affect the answer query response. For more information on boosting, see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)" + }, + "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" + }, + "maxReturnResults": { + "description": "Number of search results to return. The default value is 10.", + "format": "int32", + "type": "integer" + }, + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", + "type": "string" + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode is based on DataStore.DocumentProcessingConfig.chunking_config: * If DataStore.DocumentProcessingConfig.chunking_config is specified, it defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See [parse and chunk documents](https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents)", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DataStore.DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList": { + "description": "Search result list.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList", + "properties": { + "searchResults": { + "description": "Search results.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult": { + "description": "Search result.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult", + "properties": { + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "description": "Chunk information." + }, + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", + "description": "Unstructured document information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", + "type": "string" + }, + "content": { + "description": "Chunk textual content.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", + "properties": { + "document": { + "description": "Document resource name.", + "type": "string" + }, + "documentContexts": { + "description": "List of document contexts.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" + }, + "type": "array" + }, + "extractiveAnswers": { + "description": "List of extractive answers.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" + }, + "type": "array" + }, + "extractiveSegments": { + "description": "List of extractive segments.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment" + }, + "type": "array" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext": { + "description": "Document context.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", + "properties": { + "content": { + "description": "Document content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer": { + "description": "Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer", + "properties": { + "content": { + "description": "Extractive answer content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", + "properties": { + "content": { + "description": "Extractive segment content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse": { + "description": "Response message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse", + "properties": { + "answer": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer", + "description": "Answer resource object. If AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." + }, + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { + "description": "Query understanding information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "properties": { + "queryClassificationInfo": { + "description": "Query classification information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { + "description": "Query classification information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", + "properties": { + "positive": { + "description": "Classification output.", + "type": "boolean" + }, + "type": { + "description": "Query classification type.", + "enum": [ + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" + ], + "enumDescriptions": [ + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReference": { + "description": "Reference.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", + "properties": { + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "description": "Chunk information." + }, + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "description": "Unstructured document information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", + "type": "string" + }, + "content": { + "description": "Chunk textual content.", + "type": "string" + }, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "description": "Document metadata." + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { + "description": "Document metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "properties": { + "document": { + "description": "Document resource name.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "properties": { + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" + }, + "type": "array" + }, + "document": { + "description": "Document resource name.", + "type": "string" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", + "properties": { + "content": { + "description": "Chunk textual content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerStep": { + "description": "Step information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", + "properties": { + "actions": { + "description": "Actions.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + }, + "type": "array" + }, + "description": { + "description": "The description of the step.", + "type": "string" + }, + "state": { + "description": "The state of the step.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Step is currently in progress.", + "Step currently failed.", + "Step has succeeded." + ], + "type": "string" + }, + "thought": { + "description": "The thought of the step.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { + "description": "Action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "observation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", + "description": "Observation." + }, + "searchAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "description": "Search action." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1TargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { + "description": "Observation.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", - "type": "string" + "searchResults": { + "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1UpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunkInfo": { + "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" + }, + "type": "array" + }, + "document": { + "description": "Document resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "snippetInfo": { + "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" + }, + "type": "array" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1UpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "content": { + "description": "Chunk textual content.", "type": "string" + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAclConfig": { - "description": "Access Control Configuration.", - "id": "GoogleCloudDiscoveryengineV1alphaAclConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", "properties": { - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Identity provider config." + "snippet": { + "description": "Snippet content.", + "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaAdditionalParams": { - "description": "AdditionalParams message for WidgetService methods for security and privacy enhancement.", - "id": "GoogleCloudDiscoveryengineV1alphaAdditionalParams", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", "properties": { - "token": { - "description": "Token that used for non-human user check.", + "query": { + "description": "The query to search.", "type": "string" } }, @@ -6412,7 +7933,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder.", + "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical.", "type": "string" }, "datasetId": { @@ -6450,40 +7971,41 @@ "type": "object" }, "keyFieldName": { - "description": "The field name used for saving row key value in the UCS document. The name has to match a-zA-Z0-9*", + "description": "The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`.", "type": "string" } }, "type": "object" }, "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn": { + "description": "The column of the Bigtable.", "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn", "properties": { "encoding": { - "description": "Optional. The encoding mode of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.", + "description": "The encoding mode of the values when the type is not `STRING`. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", "enum": [ "ENCODING_UNSPECIFIED", "TEXT", "BINARY" ], "enumDescriptions": [ - "", - "", - "" + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." ], "type": "string" }, "fieldName": { - "description": "The field name to use for this column in the UCS document. The name has to match a-zA-Z0-9* If not set, we will parse it from the qualifier bytes with best effort. However, field name collisions could happen, where parsing behavior is undefined.", + "description": "The field name to use for this column in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the qualifier bytes with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", "type": "string" }, "qualifier": { - "description": "Required. Qualifier of the column. If cannot decode with utf-8, store a base-64 encoded string.", + "description": "Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead.", "format": "byte", "type": "string" }, "type": { - "description": "Optional. The type of values in this column family. The values are expected to be encoded using HBase Bytes.toBytes function when the encoding value is set to BINARY.", + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", "enum": [ "TYPE_UNSPECIFIED", "STRING", @@ -6495,14 +8017,14 @@ "JSON" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." ], "type": "string" } @@ -6510,6 +8032,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily": { + "description": "The column family of the Bigtable.", "id": "GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily", "properties": { "columns": { @@ -6520,25 +8043,25 @@ "type": "array" }, "encoding": { - "description": "Optional. The encoding mode of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.", + "description": "The encoding mode of the values when the type is not STRING. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", "enum": [ "ENCODING_UNSPECIFIED", "TEXT", "BINARY" ], "enumDescriptions": [ - "", - "", - "" + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." ], "type": "string" }, "fieldName": { - "description": "The field name to use for this column family in the UCS document. The name has to match a-zA-Z0-9* If not set, we will parse it from the family name with best effort. However, due to difference naming pattern, there could be field name collisions, where parsing behavior is undefined.", + "description": "The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", "type": "string" }, "type": { - "description": "Optional. The type of values in this column family. The values are expected to be encoded using HBase Bytes.toBytes function when the encoding value is set to BINARY.", + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", "enum": [ "TYPE_UNSPECIFIED", "STRING", @@ -6550,14 +8073,14 @@ "JSON" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." ], "type": "string" } @@ -6565,7 +8088,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaBigtableSource": { - "description": "The Cloud Bigtable source for importing data", + "description": "The Cloud Bigtable source for importing data.", "id": "GoogleCloudDiscoveryengineV1alphaBigtableSource", "properties": { "bigtableOptions": { @@ -6573,16 +8096,105 @@ "description": "Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations." }, "instanceId": { - "description": "Required. The instance ID of the Cloud Bigtable that needs to be exported.", + "description": "Required. The instance ID of the Cloud Bigtable that needs to be imported.", "type": "string" }, "projectId": { - "description": "The project ID (can be project # or ID) that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { - "description": "Required. The table ID of the Cloud Bigtable that needs to be exported.", + "description": "Required. The table ID of the Cloud Bigtable that needs to be imported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest": { + "description": "Request message for GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest", + "properties": { + "answerCandidate": { + "description": "Answer candidate to check.", + "type": "string" + }, + "facts": { + "description": "List of facts for the grounding check. We support up to 200 facts.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaGroundingFact" + }, + "type": "array" + }, + "groundingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", + "description": "Configuration of the grounding check." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse": { + "description": "Response message for the GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse", + "properties": { + "citedChunks": { + "description": "List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFactChunk" + }, + "type": "array" + }, + "claims": { + "description": "Claim texts and citation info across all claims in the answer candidate.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim" + }, + "type": "array" + }, + "supportScore": { + "description": "The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim": { + "description": "Text and citation info for a claim in the answer candidate.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim", + "properties": { + "citationIndices": { + "description": "A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "claimText": { + "description": "Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.", "type": "string" + }, + "endPos": { + "description": "Position indicating the end of the claim in the answer candidate, exclusive.", + "format": "int32", + "type": "integer" + }, + "startPos": { + "description": "Position indicating the start of the claim in the answer candidate, measured in bytes/unicode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec": { + "description": "Specification for the grounding check.", + "id": "GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec", + "properties": { + "citationThreshold": { + "description": "The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.", + "format": "double", + "type": "number" } }, "type": "object" @@ -6614,7 +8226,7 @@ "description": "Metadata of the document from the current chunk." }, "id": { - "description": "Unique chunk id of the current chunk.", + "description": "Unique chunk ID of the current chunk.", "type": "string" }, "name": { @@ -6690,7 +8302,7 @@ "type": "string" }, "gcsStagingDir": { - "description": "Optional. Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Please ensure that the Cloud SQL service account has the necessary GCS Storage Admin permissions to access the specified GCS directory.", + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Please ensure that the Cloud SQL service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", "type": "string" }, "instanceId": { @@ -6698,11 +8310,11 @@ "type": "string" }, "offload": { - "description": "Optional. Option for serverless export. Enabling this option will incur additional cost. More info: https://cloud.google.com/sql/pricing#serverless", + "description": "Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless).", "type": "boolean" }, "projectId": { - "description": "Optional. The project ID (can be project # or ID) that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -7947,6 +9559,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaFactChunk": { + "description": "Fact Chunk.", + "id": "GoogleCloudDiscoveryengineV1alphaFactChunk", + "properties": { + "chunkText": { + "description": "Text content of the fact chunk. Can be at most 10K characters long.", + "type": "string" + }, + "source": { + "description": "Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.", + "type": "string" + }, + "sourceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "More fine-grained information for the source reference.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse", @@ -8115,7 +9749,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaFirestoreSource", "properties": { "collectionId": { - "description": "Required. The Firestore collection to copy the data from with a length limit of 1500 characters.", + "description": "Required. The Firestore collection to copy the data from with a length limit of 1,500 characters.", "type": "string" }, "databaseId": { @@ -8123,11 +9757,11 @@ "type": "string" }, "gcsStagingDir": { - "description": "Optional. Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Please ensure that the Firestore service account has the necessary GCS Storage Admin permissions to access the specified GCS directory.", + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Please ensure that the Firestore service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", "type": "string" }, "projectId": { - "description": "Optional. The project ID (can be project # or ID) that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" } }, @@ -8138,7 +9772,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaGcsSource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by Gen App Builder. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", + "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", "type": "string" }, "inputUris": { @@ -8151,12 +9785,19 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaGroundingConfig": { - "description": "Grounding configuration.", - "id": "GoogleCloudDiscoveryengineV1alphaGroundingConfig", + "GoogleCloudDiscoveryengineV1alphaGroundingFact": { + "description": "Grounding Fact.", + "id": "GoogleCloudDiscoveryengineV1alphaGroundingFact", "properties": { - "name": { - "description": "Required. Name of the GroundingConfig, of the form `projects/{project}/locations/{location}/groundingConfig`.", + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.", + "type": "object" + }, + "factText": { + "description": "Text content of the fact. Can be at most 10K characters long.", "type": "string" } }, @@ -8278,6 +9919,11 @@ "format": "int64", "type": "string" }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -8291,7 +9937,7 @@ "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest", "properties": { "autoGenerateIds": { - "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource", + "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", "type": "boolean" }, "bigquerySource": { @@ -8323,7 +9969,7 @@ "description": "Cloud Storage location for the input content." }, "idField": { - "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource", + "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", "type": "string" }, "inlineSource": { @@ -8347,6 +9993,11 @@ "spannerSource": { "$ref": "GoogleCloudDiscoveryengineV1alphaSpannerSource", "description": "Spanner input source." + }, + "updateMask": { + "description": "Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields.", + "format": "google-fieldmask", + "type": "string" } }, "type": "object" @@ -8709,6 +10360,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "sessions": { + "description": "All the Sessions for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse": { "description": "Response message for SiteSearchEngineService.ListTargetSites method.", "id": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse", @@ -9036,6 +10705,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaQuery": { + "description": "Defines a user inputed query.", + "id": "GoogleCloudDiscoveryengineV1alphaQuery", + "properties": { + "queryId": { + "description": "Unique Id for the query.", + "type": "string" + }, + "text": { + "description": "Plain text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaRankRequest": { "description": "Request message for RankService.Rank method.", "id": "GoogleCloudDiscoveryengineV1alphaRankRequest", @@ -9053,7 +10737,7 @@ "type": "string" }, "records": { - "description": "Required. A list of records to rank.", + "description": "Required. A list of records to rank. At most 100 records to rank.", "items": { "$ref": "GoogleCloudDiscoveryengineV1alphaRankingRecord" }, @@ -9483,7 +11167,7 @@ "type": "string" }, "pageSize": { - "description": "Maximum number of Documents to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 100. Values above 100 are coerced to 100. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", "type": "integer" }, @@ -9563,6 +11247,10 @@ "format": "float", "type": "number" }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, "condition": { "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" @@ -9570,6 +11258,66 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "description": "Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "properties": { + "attributeType": { + "description": "The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" + ], + "enumDescriptions": [ + "Unspecified AttributeType.", + "The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.", + "For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" + }, + "controlPoints": { + "description": "The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "The interpolation type to be applied to connect the control points listed below.", + "enum": [ + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" + ], + "enumDescriptions": [ + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "description": "The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).", + "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "properties": { + "attributeValue": { + "description": "Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.", + "type": "string" + }, + "boostAmount": { + "description": "The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec": { "description": "A specification for configuring the behavior of content search.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec", @@ -10463,6 +12211,67 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaSession": { + "description": "External session proto definition.", + "id": "GoogleCloudDiscoveryengineV1alphaSession", + "properties": { + "endTime": { + "description": "Output only. The time the session finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "type": "string" + }, + "startTime": { + "description": "Output only. The time the session started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the session.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS" + ], + "enumDescriptions": [ + "State is unspecified.", + "The session is currently open." + ], + "type": "string" + }, + "turns": { + "description": "Turns.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" + }, + "type": "array" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSessionTurn": { + "description": "Represents a turn, including a query from the user and a answer from service.", + "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", + "properties": { + "answer": { + "description": "The resource name of the answer to the user query.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "The user query." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine": { "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", "id": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine", @@ -10511,7 +12320,7 @@ "type": "string" }, "enableDataBoost": { - "description": "Optional. Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info: https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas", + "description": "Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).", "type": "boolean" }, "instanceId": { @@ -10749,7 +12558,7 @@ "type": "object" }, "modelStatus": { - "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving.", + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", "type": "string" } }, @@ -11934,17 +13743,6 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaGroundingConfig": { - "description": "Grounding configuration.", - "id": "GoogleCloudDiscoveryengineV1betaGroundingConfig", - "properties": { - "name": { - "description": "Required. Name of the GroundingConfig, of the form `projects/{project}/locations/{location}/groundingConfig`.", - "type": "string" - } - }, - "type": "object" - }, "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata": { "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata", @@ -11964,6 +13762,11 @@ "format": "int64", "type": "string" }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -12373,7 +14176,7 @@ "type": "object" }, "modelStatus": { - "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving.", + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", "type": "string" } }, diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 4e0c6622083..32bd0c06d5a 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -186,6 +186,8 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.Evaluations = NewProjectsLocationsEvaluationsService(s) + rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) return rs @@ -198,6 +200,10 @@ type ProjectsLocationsService struct { DataStores *ProjectsLocationsDataStoresService + Evaluations *ProjectsLocationsEvaluationsService + + GroundingConfigs *ProjectsLocationsGroundingConfigsService + Operations *ProjectsLocationsOperationsService RankingConfigs *ProjectsLocationsRankingConfigsService @@ -253,6 +259,7 @@ func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocat rs.Operations = NewProjectsLocationsCollectionsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsCollectionsDataStoresSchemasService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsDataStoresServingConfigsService(s) + rs.Sessions = NewProjectsLocationsCollectionsDataStoresSessionsService(s) rs.SiteSearchEngine = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsCollectionsDataStoresUserEventsService(s) @@ -274,6 +281,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { ServingConfigs *ProjectsLocationsCollectionsDataStoresServingConfigsService + Sessions *ProjectsLocationsCollectionsDataStoresSessionsService + SiteSearchEngine *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService SuggestionDenyListEntries *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService @@ -395,6 +404,27 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresSessionsService(s *Service) *ProjectsLocationsCollectionsDataStoresSessionsService { + rs := &ProjectsLocationsCollectionsDataStoresSessionsService{s: s} + rs.Answers = NewProjectsLocationsCollectionsDataStoresSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsCollectionsDataStoresSessionsService struct { + s *Service + + Answers *ProjectsLocationsCollectionsDataStoresSessionsAnswersService +} + +func NewProjectsLocationsCollectionsDataStoresSessionsAnswersService(s *Service) *ProjectsLocationsCollectionsDataStoresSessionsAnswersService { + rs := &ProjectsLocationsCollectionsDataStoresSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService(s) @@ -463,6 +493,7 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation rs.Conversations = NewProjectsLocationsCollectionsEnginesConversationsService(s) rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) + rs.Sessions = NewProjectsLocationsCollectionsEnginesSessionsService(s) return rs } @@ -474,6 +505,8 @@ type ProjectsLocationsCollectionsEnginesService struct { Operations *ProjectsLocationsCollectionsEnginesOperationsService ServingConfigs *ProjectsLocationsCollectionsEnginesServingConfigsService + + Sessions *ProjectsLocationsCollectionsEnginesSessionsService } func NewProjectsLocationsCollectionsEnginesConversationsService(s *Service) *ProjectsLocationsCollectionsEnginesConversationsService { @@ -503,6 +536,27 @@ type ProjectsLocationsCollectionsEnginesServingConfigsService struct { s *Service } +func NewProjectsLocationsCollectionsEnginesSessionsService(s *Service) *ProjectsLocationsCollectionsEnginesSessionsService { + rs := &ProjectsLocationsCollectionsEnginesSessionsService{s: s} + rs.Answers = NewProjectsLocationsCollectionsEnginesSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsCollectionsEnginesSessionsService struct { + s *Service + + Answers *ProjectsLocationsCollectionsEnginesSessionsAnswersService +} + +func NewProjectsLocationsCollectionsEnginesSessionsAnswersService(s *Service) *ProjectsLocationsCollectionsEnginesSessionsAnswersService { + rs := &ProjectsLocationsCollectionsEnginesSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsCollectionsOperationsService(s *Service) *ProjectsLocationsCollectionsOperationsService { rs := &ProjectsLocationsCollectionsOperationsService{s: s} return rs @@ -520,6 +574,7 @@ func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataSto rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsDataStoresSchemasService(s) rs.ServingConfigs = NewProjectsLocationsDataStoresServingConfigsService(s) + rs.Sessions = NewProjectsLocationsDataStoresSessionsService(s) rs.SiteSearchEngine = NewProjectsLocationsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsDataStoresUserEventsService(s) @@ -541,6 +596,8 @@ type ProjectsLocationsDataStoresService struct { ServingConfigs *ProjectsLocationsDataStoresServingConfigsService + Sessions *ProjectsLocationsDataStoresSessionsService + SiteSearchEngine *ProjectsLocationsDataStoresSiteSearchEngineService SuggestionDenyListEntries *ProjectsLocationsDataStoresSuggestionDenyListEntriesService @@ -650,6 +707,27 @@ type ProjectsLocationsDataStoresServingConfigsService struct { s *Service } +func NewProjectsLocationsDataStoresSessionsService(s *Service) *ProjectsLocationsDataStoresSessionsService { + rs := &ProjectsLocationsDataStoresSessionsService{s: s} + rs.Answers = NewProjectsLocationsDataStoresSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsDataStoresSessionsService struct { + s *Service + + Answers *ProjectsLocationsDataStoresSessionsAnswersService +} + +func NewProjectsLocationsDataStoresSessionsAnswersService(s *Service) *ProjectsLocationsDataStoresSessionsAnswersService { + rs := &ProjectsLocationsDataStoresSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsDataStoresSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsDataStoresSiteSearchEngineService{s: s} rs.TargetSites = NewProjectsLocationsDataStoresSiteSearchEngineTargetSitesService(s) @@ -689,6 +767,36 @@ type ProjectsLocationsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsEvaluationsService(s *Service) *ProjectsLocationsEvaluationsService { + rs := &ProjectsLocationsEvaluationsService{s: s} + rs.Operations = NewProjectsLocationsEvaluationsOperationsService(s) + return rs +} + +type ProjectsLocationsEvaluationsService struct { + s *Service + + Operations *ProjectsLocationsEvaluationsOperationsService +} + +func NewProjectsLocationsEvaluationsOperationsService(s *Service) *ProjectsLocationsEvaluationsOperationsService { + rs := &ProjectsLocationsEvaluationsOperationsService{s: s} + return rs +} + +type ProjectsLocationsEvaluationsOperationsService struct { + s *Service +} + +func NewProjectsLocationsGroundingConfigsService(s *Service) *ProjectsLocationsGroundingConfigsService { + rs := &ProjectsLocationsGroundingConfigsService{s: s} + return rs +} + +type ProjectsLocationsGroundingConfigsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1986,6 +2094,9 @@ type GoogleCloudDiscoveryengineV1ImportDocumentsMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -2756,50 +2867,107 @@ func (s *GoogleCloudDiscoveryengineV1alphaAdditionalParams) MarshalJSON() ([]byt return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1alphaAnswer: Defines an answer. +type GoogleCloudDiscoveryengineV1alphaAnswer struct { + // AnswerSkippedReasons: Additional answer-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. + // + // Possible values: + // "ANSWER_SKIPPED_REASON_UNSPECIFIED" - Default value. The answer + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query + // ignored case. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the answer if there are no high-relevance search + // results. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the answer if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` + + // AnswerText: The textual answer. + AnswerText string `json:"answerText,omitempty"` + + // Citations: Citations. + Citations []*GoogleCloudDiscoveryengineV1alphaAnswerCitation `json:"citations,omitempty"` + + // CompleteTime: Output only. Answer completed timestamp. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*/answers/*` + Name string `json:"name,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // QueryUnderstandingInfo: Query understanding information. + QueryUnderstandingInfo *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo `json:"queryUnderstandingInfo,omitempty"` + + // References: References. + References []*GoogleCloudDiscoveryengineV1alphaAnswerReference `json:"references,omitempty"` + + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + + // State: The state of the answer generation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Answer generation is currently in progress. + // "FAILED" - Answer generation currently failed. + // "SUCCEEDED" - Answer generation has succeeded. + State string `json:"state,omitempty"` + + // Steps: Answer generation steps. + Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AnswerSkippedReasons") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AnswerSkippedReasons") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest: -// Request message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest struct { - // Requests: Required. The request message specifying the resources to - // create. A maximum of 20 TargetSites can be created in a batch. - Requests []*GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest `json:"requests,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a +// segment. +type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Requests") to + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + + // StartIndex: Index indicates the start of the segment, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2807,7 +2975,7 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in + // NullFields is a list of field names (e.g. "EndIndex") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2816,20 +2984,19 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest +func (s *GoogleCloudDiscoveryengineV1alphaAnswerCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerCitation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse: -// Response message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerCitationSource: Citation +// source. +type GoogleCloudDiscoveryengineV1alphaAnswerCitationSource struct { + // ReferenceId: ID of the citation source. + ReferenceId string `json:"referenceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetSites") to + // ForceSendFields is a list of field names (e.g. "ReferenceId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2837,7 +3004,7 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSites") to include + // NullFields is a list of field names (e.g. "ReferenceId") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -2846,55 +3013,151 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerCitationSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest: -// Request message for SiteSearchEngineService.BatchVerifyTargetSites -// method. -type GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest struct { +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest: Request message +// for ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest struct { + // AnswerGenerationSpec: Answer generation specification. + AnswerGenerationSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` + + // AsynchronousMode: Asynchronous mode control. If enabled, the response + // will be returned with answer/session resource name without final + // answer. The API users need to do the polling to get the latest status + // of answer/session by calling ConversationalSearchService.GetAnswer or + // ConversationalSearchService.GetSession method. + AsynchronousMode bool `json:"asynchronousMode,omitempty"` + + // Query: Required. Current user query. + Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` + + // QueryUnderstandingSpec: Query understanding specification. + QueryUnderstandingSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec `json:"queryUnderstandingSpec,omitempty"` + + // RelatedQuestionsSpec: Related questions specification. + RelatedQuestionsSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec `json:"relatedQuestionsSpec,omitempty"` + + // SafetySpec: Model specification. + SafetySpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec `json:"safetySpec,omitempty"` + + // SearchSpec: Search specification. + SearchSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec `json:"searchSpec,omitempty"` + + // Session: The session resource name. Not required. When session field + // is not set, the API is in sessionless mode. We support auto session + // mode: users can use the wildcard symbol “-” as session id. A new + // id will be automatically generated and assigned. + Session string `json:"session,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. The field must be a UTF-8 encoded string with a + // length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AnswerGenerationSpec") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerGenerationSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` } -// GoogleCloudDiscoveryengineV1alphaBigQuerySource: BigQuery source -// import data from. -type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for user event imports: * `user_event` (default): - // One UserEvent per row. Supported values for document imports: * - // `document` (default): One Document format per row. Each document must - // have a valid Document.id and one of Document.json_data or - // Document.struct_data. * `custom`: One custom data per row in - // arbitrary format that conforms to the defined Schema of the data - // store. This can only be used by Gen App Builder. - DataSchema string `json:"dataSchema,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // DatasetId: Required. The BigQuery data set to copy the data from with - // a length limit of 1,024 characters. - DatasetId string `json:"datasetId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpe +// c: Answer generation specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec struct { + // AnswerLanguageCode: Language code for Answer. Use language tags + // defined by BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Note: This is an experimental feature. + AnswerLanguageCode string `json:"answerLanguageCode,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the - // import with a length limit of 2,000 characters. Can be specified if - // one wants to have the BigQuery export to a specific Cloud Storage - // directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial + // queries. The default value is `false`. Google employs search-query + // classification to detect adversarial queries. No answer is returned + // if the search query is classified as an adversarial query. For + // example, a user might ask a question regarding negative comments + // about the company or submit a query designed to generate unsafe, + // policy-violating output. If this field is set to `true`, we skip + // generating answers for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in - // YYYY-MM-DD format. - PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` + // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries + // that are not answer-seeking. The default value is `false`. Google + // employs search-query classification to detect answer-seeking queries. + // No answer is returned if the search query is classified as a + // non-answer seeking query. If this field is set to `true`, we skip + // generating answers for non-answer seeking queries and return fallback + // messages instead. + IgnoreNonAnswerSeekingQuery bool `json:"ignoreNonAnswerSeekingQuery,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery - // source is in with a length limit of 128 characters. If not specified, - // inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` + // IncludeCitations: Specifies whether to include citation metadata in + // the answer. The default value is `false`. + IncludeCitations bool `json:"includeCitations,omitempty"` - // TableId: Required. The BigQuery table to copy the data from with a - // length limit of 1,024 characters. - TableId string `json:"tableId,omitempty"` + // ModelSpec: Answer generation model specification. + ModelSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec `json:"modelSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to + // PromptSpec: Answer generation prompt specification. + PromptSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec `json:"promptSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerLanguageCode") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerLanguageCode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpe +// cModelSpec: Answer Generation Model specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec struct { + // ModelVersion: Model version. If not set, it will use the default + // stable model. Allowed values are: stable, preview. + ModelVersion string `json:"modelVersion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ModelVersion") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2902,34 +3165,28 @@ type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSchema") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ModelVersion") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBigQuerySource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBigQuerySource +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecModelSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBigtableOptions: The Bigtable -// Options object that contains information to support the import. -type GoogleCloudDiscoveryengineV1alphaBigtableOptions struct { - // Families: The mapping from family names to an object that contains - // column families level information for the given column family. If a - // family is not present in this map it will be ignored. - Families map[string]GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` - - // KeyFieldName: The field name used for saving row key value in the UCS - // document. The name has to match a-zA-Z0-9* - KeyFieldName string `json:"keyFieldName,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpe +// cPromptSpec: Answer generation prompt specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec struct { + // Preamble: Customized preamble. + Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "Families") to + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2937,7 +3194,7 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptions struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Families") to include in + // NullFields is a list of field names (e.g. "Preamble") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2946,52 +3203,59 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptions struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptions +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestAnswerGenerationSpecPromptSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn struct { - // Encoding: Optional. The encoding mode of the values when the type is - // not STRING. Acceptable encoding values are: TEXT - indicates values - // are alphanumeric text strings. BINARY - indicates values are encoded - // using HBase Bytes.toBytes family of functions. This can be overridden - // for a specific column by listing that column in 'columns' and - // specifying an encoding for it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - // "TEXT" - // "BINARY" - Encoding string `json:"encoding,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingS +// pec: Query understanding specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec struct { + // QueryClassificationSpec: Query classification specification. + QueryClassificationSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec `json:"queryClassificationSpec,omitempty"` - // FieldName: The field name to use for this column in the UCS document. - // The name has to match a-zA-Z0-9* If not set, we will parse it from - // the qualifier bytes with best effort. However, field name collisions - // could happen, where parsing behavior is undefined. - FieldName string `json:"fieldName,omitempty"` + // QueryRephraserSpec: Query rephraser specification. + QueryRephraserSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec `json:"queryRephraserSpec,omitempty"` - // Qualifier: Required. Qualifier of the column. If cannot decode with - // utf-8, store a base-64 encoded string. - Qualifier string `json:"qualifier,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "QueryClassificationSpec") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QueryClassificationSpec") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // Type: Optional. The type of values in this column family. The values - // are expected to be encoded using HBase Bytes.toBytes function when - // the encoding value is set to BINARY. +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingS +// pecQueryClassificationSpec: Query classification specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec struct { + // Types: Enabled query classification types. // // Possible values: - // "TYPE_UNSPECIFIED" - // "STRING" - // "NUMBER" - // "INTEGER" - // "VAR_INTEGER" - // "BIG_NUMERIC" - // "BOOLEAN" - // "JSON" - Type string `json:"type,omitempty"` + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query + // classification type. + Types []string `json:"types,omitempty"` - // ForceSendFields is a list of field names (e.g. "Encoding") to + // ForceSendFields is a list of field names (e.g. "Types") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2999,8 +3263,8 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Encoding") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Types") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3008,54 +3272,23 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily struct { - // Columns: The list of objects that contains column level information - // for each column. If a column is not present in this list it will be - // ignored. - Columns []*GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn `json:"columns,omitempty"` - - // Encoding: Optional. The encoding mode of the values when the type is - // not STRING. Acceptable encoding values are: TEXT - indicates values - // are alphanumeric text strings. BINARY - indicates values are encoded - // using HBase Bytes.toBytes family of functions. This can be overridden - // for a specific column by listing that column in 'columns' and - // specifying an encoding for it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - // "TEXT" - // "BINARY" - Encoding string `json:"encoding,omitempty"` - - // FieldName: The field name to use for this column family in the UCS - // document. The name has to match a-zA-Z0-9* If not set, we will parse - // it from the family name with best effort. However, due to difference - // naming pattern, there could be field name collisions, where parsing - // behavior is undefined. - FieldName string `json:"fieldName,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingS +// pecQueryRephraserSpec: Query rephraser specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec struct { + // Disable: Disable query rephraser. + Disable bool `json:"disable,omitempty"` - // Type: Optional. The type of values in this column family. The values - // are expected to be encoded using HBase Bytes.toBytes function when - // the encoding value is set to BINARY. - // - // Possible values: - // "TYPE_UNSPECIFIED" - // "STRING" - // "NUMBER" - // "INTEGER" - // "VAR_INTEGER" - // "BIG_NUMERIC" - // "BOOLEAN" - // "JSON" - Type string `json:"type,omitempty"` + // MaxRephraseSteps: Max rephrase steps. The max number is 10 steps. If + // not set or set to < 1, it will be set to 1 by default. + MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` - // ForceSendFields is a list of field names (e.g. "Columns") to + // ForceSendFields is a list of field names (e.g. "Disable") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3063,7 +3296,7 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Columns") to include in + // NullFields is a list of field names (e.g. "Disable") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3072,34 +3305,19 @@ type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBigtableSource: The Cloud Bigtable -// source for importing data -type GoogleCloudDiscoveryengineV1alphaBigtableSource struct { - // BigtableOptions: Required. Bigtable options that contains information - // needed when parsing data into typed structures. For example, column - // type annotations. - BigtableOptions *GoogleCloudDiscoveryengineV1alphaBigtableOptions `json:"bigtableOptions,omitempty"` - - // InstanceId: Required. The instance ID of the Cloud Bigtable that - // needs to be exported. - InstanceId string `json:"instanceId,omitempty"` - - // ProjectId: The project ID (can be project # or ID) that the Bigtable - // source is in with a length limit of 128 characters. If not specified, - // inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` - - // TableId: Required. The table ID of the Cloud Bigtable that needs to - // be exported. - TableId string `json:"tableId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpe +// c: Related questions specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec struct { + // Enable: Enable related questions feature if true. + Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigtableOptions") to + // ForceSendFields is a list of field names (e.g. "Enable") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3107,57 +3325,61 @@ type GoogleCloudDiscoveryengineV1alphaBigtableSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigtableOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBigtableSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableSource +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaChunk: Chunk captures all raw -// metadata information of items to be recommended or searched in the -// chunk mode. -type GoogleCloudDiscoveryengineV1alphaChunk struct { - // ChunkMetadata: Output only. Metadata of the current chunk. - ChunkMetadata *GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata `json:"chunkMetadata,omitempty"` - - // Content: Content is a string from a document (parsed content). - Content string `json:"content,omitempty"` - - // DerivedStructData: Output only. This field is OUTPUT_ONLY. It - // contains derived data that are not in the original input document. - DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec: Safety +// specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec struct { + // Enable: Enable the safety filtering on the answer response. It is + // false by default. + Enable bool `json:"enable,omitempty"` - // DocumentMetadata: Metadata of the document from the current chunk. - DocumentMetadata *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata `json:"documentMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Id: Unique chunk id of the current chunk. - Id string `json:"id,omitempty"` + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Name: The full resource name of the chunk. Format: - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{ - // chunk_id}`. This field must be a UTF-8 encoded string with a length - // limit of 1024 characters. - Name string `json:"name,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // PageSpan: Page span of the chunk. - PageSpan *GoogleCloudDiscoveryengineV1alphaChunkPageSpan `json:"pageSpan,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec: Search +// specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec struct { + // SearchParams: Search parameters. + SearchParams *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams `json:"searchParams,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SearchResultList: Search result list. + SearchResultList *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList `json:"searchResultList,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkMetadata") to + // ForceSendFields is a list of field names (e.g. "SearchParams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3165,7 +3387,7 @@ type GoogleCloudDiscoveryengineV1alphaChunk struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkMetadata") to include + // NullFields is a list of field names (e.g. "SearchParams") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -3174,29 +3396,64 @@ type GoogleCloudDiscoveryengineV1alphaChunk struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaChunk) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaChunk +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata: Metadata of the -// current chunk. This field is only populated on SearchService.Search -// API. -type GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata struct { - // NextChunks: The next chunks of the current chunk. The number is - // controlled by - // SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field - // is only populated on SearchService.Search API. - NextChunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"nextChunks,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchPar +// ams: Search parameters. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams struct { + // BoostSpec: Boost specification to boost certain documents in search + // results which may affect the answer query response. For more + // information on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // PreviousChunks: The previous chunks of the current chunk. The number - // is controlled by - // SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This - // field is only populated on SearchService.Search API. - PreviousChunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"previousChunks,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. This will be + // used to filter search results which may affect the Answer response. + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + // Filtering in Vertex AI Search is done by mapping the LHS filter key + // to a key property defined in the Vertex AI Search backend -- this + // mapping is defined by the customer in their schema. For example a + // media customers might have a field 'name' in their schema. In this + // case the filter would look like this: filter --> name:'ANY("king + // kong")' For more information about filtering including syntax and + // filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextChunks") to + // MaxReturnResults: Number of search results to return. The default + // value is 10. + MaxReturnResults int64 `json:"maxReturnResults,omitempty"` + + // OrderBy: The order in which documents are returned. Documents can be + // ordered by a field in an Document object. Leave it unset if ordered + // by relevance. `order_by` expression is case-sensitive. For more + // information on ordering, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this + // field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + + // SearchResultMode: Specifies the search result mode. If unspecified, + // the search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it + // defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. See + // parse and chunk documents + // (https://cloud.google.com/generative-ai-app-builder/docs/parse-chunk-documents) + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if + // the DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3204,7 +3461,7 @@ type GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextChunks") to include in + // NullFields is a list of field names (e.g. "BoostSpec") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3213,23 +3470,19 @@ type GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchParams raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata: Document -// metadata contains the information of the document of the current -// chunk. -type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { - // Title: Title of the document. - Title string `json:"title,omitempty"` - - // Uri: Uri of the document. - Uri string `json:"uri,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultList: Search result list. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList struct { + // SearchResults: Search results. + SearchResults []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult `json:"searchResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "Title") to + // ForceSendFields is a list of field names (e.g. "SearchResults") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3237,31 +3490,31 @@ type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Title") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "SearchResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaChunkPageSpan: Page span of the -// chunk. -type GoogleCloudDiscoveryengineV1alphaChunkPageSpan struct { - // PageEnd: The end page of the chunk. - PageEnd int64 `json:"pageEnd,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResult: Search result. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo `json:"chunkInfo,omitempty"` - // PageStart: The start page of the chunk. - PageStart int64 `json:"pageStart,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageEnd") to + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3269,7 +3522,7 @@ type GoogleCloudDiscoveryengineV1alphaChunkPageSpan struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageEnd") to include in + // NullFields is a list of field names (e.g. "ChunkInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3278,46 +3531,22 @@ type GoogleCloudDiscoveryengineV1alphaChunkPageSpan struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaChunkPageSpan) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaChunkPageSpan +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCloudSqlSource: Cloud SQL source -// import data from. -type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { - // DatabaseId: Required. The Cloud SQL database to copy the data from - // with a length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResultChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // GcsStagingDir: Optional. Intermediate Cloud Storage directory used - // for the import with a length limit of 2,000 characters. Can be - // specified if one wants to have the Cloud SQL export to a specific - // Cloud Storage directory. Please ensure that the Cloud SQL service - // account has the necessary GCS Storage Admin permissions to access the - // specified GCS directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // InstanceId: Required. The Cloud SQL instance to copy the data from - // with a length limit of 256 characters. - InstanceId string `json:"instanceId,omitempty"` - - // Offload: Optional. Option for serverless export. Enabling this option - // will incur additional cost. More info: - // https://cloud.google.com/sql/pricing#serverless - Offload bool `json:"offload,omitempty"` - - // ProjectId: Optional. The project ID (can be project # or ID) that the - // Cloud SQL source is in with a length limit of 128 characters. If not - // specified, inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` - - // TableId: Required. The Cloud SQL table to copy the data from with a - // length limit of 256 characters. - TableId string `json:"tableId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "DatabaseId") to + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3325,8 +3554,8 @@ type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3334,57 +3563,35 @@ type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCloudSqlSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCloudSqlSource +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest: Request -// message for CompletionService.CompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { - // DataStore: Required. The parent data store resource name for which - // the completion is performed, such as - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store`. - DataStore string `json:"dataStore,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResultUnstructuredDocumentInfo: Unstructured document +// information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` - // 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. - IncludeTailSuggestions bool `json:"includeTailSuggestions,omitempty"` + // DocumentContexts: List of document contexts. + DocumentContexts []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,omitempty"` - // Query: Required. The typeahead input used to fetch suggestions. - // Maximum length is 128 characters. - Query string `json:"query,omitempty"` + // ExtractiveAnswers: List of extractive answers. + ExtractiveAnswers []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` - // 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. - QueryModel string `json:"queryModel,omitempty"` + // ExtractiveSegments: List of extractive segments. + ExtractiveSegments []*GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` - // UserPseudoId: A unique identifier for tracking visitors. For example, - // this could be implemented with an HTTP cookie, which should be able - // to uniquely identify a visitor on a single device. This unique - // identifier should not change if the visitor logs in or out of the - // website. This field should NOT have a fixed value such as - // `unknown_visitor`. This should be the same identifier as - // UserEvent.user_pseudo_id and 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. - UserPseudoId string `json:"userPseudoId,omitempty"` + // Title: Title. + Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3392,7 +3599,7 @@ type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3401,30 +3608,23 @@ type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse: Response -// message for CompletionService.CompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse struct { - // QuerySuggestions: Results of the matched query suggestions. The - // result list is ordered and the first result is a top suggestion. - QuerySuggestions []*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` - - // TailMatchTriggered: True if the returned suggestions are all tail - // suggestions. For tail matching to be triggered, - // include_tail_suggestions in the request must be true and there must - // be no suggestions that match the full query. - TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResultUnstructuredDocumentInfoDocumentContext: Document +// context. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { + // Content: Document content. + Content string `json:"content,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3432,74 +3632,67 @@ type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuerySuggestions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion: -// -// Suggestions as search queries. -type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion struct { - // CompletableFieldPaths: The unique document field paths that serve as - // the source of this suggestion if it was generated from completable - // fields. This field is only populated for the document-completable - // model. - CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResultUnstructuredDocumentInfoExtractiveAnswer: +// Extractive answer. Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer struct { + // Content: Extractive answer content. + Content string `json:"content,omitempty"` - // Suggestion: The suggestion for the query. - Suggestion string `json:"suggestion,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CompletableFieldPaths") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletableFieldPaths") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCompletionInfo: Detailed completion -// information including completion attribution token and clicked -// completion info. -type GoogleCloudDiscoveryengineV1alphaCompletionInfo struct { - // SelectedPosition: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion position, starting - // from 0. - SelectedPosition int64 `json:"selectedPosition,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchRes +// ultListSearchResultUnstructuredDocumentInfoExtractiveSegment: +// Extractive segment. Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { + // Content: Extractive segment content. + Content string `json:"content,omitempty"` - // SelectedSuggestion: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion. - SelectedSuggestion string `json:"selectedSuggestion,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "SelectedPosition") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3507,57 +3700,39 @@ type GoogleCloudDiscoveryengineV1alphaCompletionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SelectedPosition") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCompletionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCompletionInfo +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaConversation: External conversation -// proto definition. -type GoogleCloudDiscoveryengineV1alphaConversation struct { - // EndTime: Output only. The time the conversation finished. - EndTime string `json:"endTime,omitempty"` - - // Messages: Conversation messages. - Messages []*GoogleCloudDiscoveryengineV1alphaConversationMessage `json:"messages,omitempty"` - - // Name: Immutable. Fully qualified name - // `project/*/locations/global/collections/{collection}/dataStore/*/conve - // rsations/*` or - // `project/*/locations/global/collections/{collection}/engines/*/convers - // ations/*`. - 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse: Response +// message for ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse struct { + // Answer: Answer resource object. If + // AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use + // Answer.name to fetch answer information using + // ConversationalSearchService.GetAnswer API. + Answer *GoogleCloudDiscoveryengineV1alphaAnswer `json:"answer,omitempty"` - // UserPseudoId: A unique identifier for tracking users. - UserPseudoId string `json:"userPseudoId,omitempty"` + // Session: Session resource object. It will be only available when + // session field is set and valid in the AnswerQueryRequest request. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndTime") to + // ForceSendFields is a list of field names (e.g. "Answer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3565,8 +3740,8 @@ type GoogleCloudDiscoveryengineV1alphaConversation struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -3574,60 +3749,59 @@ type GoogleCloudDiscoveryengineV1alphaConversation struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaConversation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaConversation +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaConversationContext: Defines context -// of the conversation -type GoogleCloudDiscoveryengineV1alphaConversationContext 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query +// understanding information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { + // QueryClassificationInfo: Query classification information. + QueryClassificationInfo []*GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo `json:"queryClassificationInfo,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "QueryClassificationInfo") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ActiveDocument") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "QueryClassificationInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaConversationContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaConversationContext +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaConversationMessage: Defines a -// conversation message. -type GoogleCloudDiscoveryengineV1alphaConversationMessage struct { - // CreateTime: Output only. Message creation timestamp. - CreateTime string `json:"createTime,omitempty"` - - // Reply: Search reply. - Reply *GoogleCloudDiscoveryengineV1alphaReply `json:"reply,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClas +// sificationInfo: Query classification information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo struct { + // Positive: Classification output. + Positive bool `json:"positive,omitempty"` - // UserInput: User text input. - UserInput *GoogleCloudDiscoveryengineV1alphaTextInput `json:"userInput,omitempty"` + // Type: Query classification type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query + // classification type. + Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3635,7 +3809,7 @@ type GoogleCloudDiscoveryengineV1alphaConversationMessage struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Positive") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3644,85 +3818,21 @@ type GoogleCloudDiscoveryengineV1alphaConversationMessage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaConversationMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaConversationMessage +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaConverseConversationRequest: Request -// message for ConversationalSearchService.ConverseConversation method. -type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `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 *GoogleCloudDiscoveryengineV1alphaConversation `json:"conversation,omitempty"` - - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. Filter expression is case-sensitive. This will be - // used to filter search results which may affect the summary response. - // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - // Filtering in Vertex AI Search is done by mapping the LHS filter key - // to a key property defined in the Vertex AI Search backend -- this - // mapping is defined by the customer in their schema. For example a - // media customer might have a field 'name' in their schema. In this - // case the filter would look like this: filter --> name:'ANY("king - // kong")' For more information about filtering including syntax and - // filter operators, see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` - - // Name: Required. The resource name of the Conversation to get. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion}/dataStores/{data_store_id}/conversations/{conversation_id}`. - // Use - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion}/dataStores/{data_store_id}/conversations/-` to activate auto - // session mode, which automatically creates a new conversation inside a - // ConverseConversation session. - Name string `json:"name,omitempty"` - - // Query: Required. Current user input. - Query *GoogleCloudDiscoveryengineV1alphaTextInput `json:"query,omitempty"` - - // SafeSearch: Whether to turn on safe search. - SafeSearch bool `json:"safeSearch,omitempty"` - - // ServingConfig: The resource name of the Serving Config to use. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` - // If this is not set, the default serving config will be used. - ServingConfig string `json:"servingConfig,omitempty"` - - // SummarySpec: A specification for configuring the summary returned in - // the response. - SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerReference: Reference. +type GoogleCloudDiscoveryengineV1alphaAnswerReference struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo `json:"chunkInfo,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"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3730,7 +3840,7 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") to include in + // NullFields is a list of field names (e.g. "ChunkInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3739,33 +3849,28 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaConverseConversationRequest +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaConverseConversationResponse: -// Response message for ConversationalSearchService.ConverseConversation -// method. -type GoogleCloudDiscoveryengineV1alphaConverseConversationResponse struct { - // Conversation: Updated conversation including the answer. - Conversation *GoogleCloudDiscoveryengineV1alphaConversation `json:"conversation,omitempty"` - - // RelatedQuestions: Suggested related questions. - RelatedQuestions []string `json:"relatedQuestions,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo: Chunk +// information. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // Reply: Answer to the current query. - Reply *GoogleCloudDiscoveryengineV1alphaReply `json:"reply,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // SearchResults: Search Results. - SearchResults []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"searchResults,omitempty"` + // DocumentMetadata: Document metadata. + DocumentMetadata *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conversation") to + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3773,34 +3878,51 @@ type GoogleCloudDiscoveryengineV1alphaConverseConversationResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversation") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaConverseConversationResponse +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetad +// ata: Document metadata. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3808,7 +3930,7 @@ type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3817,25 +3939,29 @@ type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentIn +// fo: Unstructured document information. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo struct { + // ChunkContents: List of cited chunk contents derived from document + // content. + ChunkContents []*GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Document: Document resource name. + Document string `json:"document,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkContents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3843,32 +3969,31 @@ type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ChunkContents") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentIn +// foChunkContent: Chunk content. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3876,7 +4001,7 @@ type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3885,25 +4010,33 @@ type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerStep: Step information. +type GoogleCloudDiscoveryengineV1alphaAnswerStep struct { + // Actions: Actions. + Actions []*GoogleCloudDiscoveryengineV1alphaAnswerStepAction `json:"actions,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Description: The description of the step. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // State: The state of the step. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Step is currently in progress. + // "FAILED" - Step currently failed. + // "SUCCEEDED" - Step has succeeded. + State string `json:"state,omitempty"` + + // Thought: The thought of the step. + Thought string `json:"thought,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3911,7 +4044,7 @@ type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Actions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -3920,24 +4053,21 @@ type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStep raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest: Request -// message for SiteSearchEngineService.CreateTargetSite method. -type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest struct { - // Parent: Required. Parent resource name of TargetSite, such as - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine`. - Parent string `json:"parent,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerStepAction: Action. +type GoogleCloudDiscoveryengineV1alphaAnswerStepAction struct { + // Observation: Observation. + Observation *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation `json:"observation,omitempty"` - // TargetSite: Required. The TargetSite to create. - TargetSite *GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSite,omitempty"` + // SearchAction: Search action. + SearchAction *GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction `json:"searchAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "Parent") to + // ForceSendFields is a list of field names (e.g. "Observation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3945,38 +4075,30 @@ type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Parent") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Observation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCustomAttribute: A custom attribute -// that is not explicitly modeled in a resource, e.g. UserEvent. -type GoogleCloudDiscoveryengineV1alphaCustomAttribute struct { - // Numbers: The numerical values of this custom attribute. For example, - // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of - // CustomAttribute.text or CustomAttribute.numbers should be set. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Numbers []float64 `json:"numbers,omitempty"` - - // Text: The textual values of this custom attribute. For example, - // `["yellow", "green"]` when the key is "color". Empty string is not - // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly - // one of CustomAttribute.text or CustomAttribute.numbers should be set. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Text []string `json:"text,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation: +// Observation. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation struct { + // SearchResults: Search results observed by the search action, it can + // be snippets info or chunk info, depending on the citation type set by + // the user. + SearchResults []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult `json:"searchResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "Numbers") to + // ForceSendFields is a list of field names (e.g. "SearchResults") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -3984,165 +4106,75 @@ type GoogleCloudDiscoveryengineV1alphaCustomAttribute struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Numbers") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "SearchResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCustomAttribute +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaCustomAttribute - var s1 struct { - Numbers []gensupport.JSONFloat64 `json:"numbers"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Numbers = make([]float64, len(s1.Numbers)) - for i := range s1.Numbers { - s.Numbers[i] = float64(s1.Numbers[i]) - } - return nil -} +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult struct { + // ChunkInfo: If citation_type is CHUNK_LEVEL_CITATION and chunk mode is + // on, populate chunk info. + ChunkInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo `json:"chunkInfo,omitempty"` -// GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec: Defines custom -// fine tuning spec. -type GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec struct { - // EnableSearchAdaptor: Whether or not to enable and include custom fine - // tuned search adaptor model. - EnableSearchAdaptor bool `json:"enableSearchAdaptor,omitempty"` + // Document: Document resource name. + Document string `json:"document,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableSearchAdaptor") - // to unconditionally include in API requests. By default, fields with + // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate + // document level snippets. + SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableSearchAdaptor") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ChunkInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1alphaDataStore struct { - // 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 - // DocumentService.GetDocument or DocumentService.ListDocuments. - // Currently ACL is only supported in `GENERIC` industry vertical with - // non-`PUBLIC_WEBSITE` content config. - AclEnabled bool `json:"aclEnabled,omitempty"` - - // ContentConfig: Immutable. The content config of the data store. If - // this field is unset, the server behavior defaults to - // ContentConfig.NO_CONTENT. - // - // Possible values: - // "CONTENT_CONFIG_UNSPECIFIED" - Default value. - // "NO_CONTENT" - Only contains documents without any - // Document.content. - // "CONTENT_REQUIRED" - Only contains documents with Document.content. - // "PUBLIC_WEBSITE" - The data store is used for public website - // search. - ContentConfig string `json:"contentConfig,omitempty"` - - // CreateTime: Output only. Timestamp the DataStore was created at. - CreateTime string `json:"createTime,omitempty"` - - // DefaultSchemaId: Output only. The id of the default Schema - // asscociated to this data store. - DefaultSchemaId string `json:"defaultSchemaId,omitempty"` - - // DisplayName: Required. The data store display name. This field must - // be a UTF-8 encoded string with a length limit of 128 characters. - // Otherwise, an INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` - - // DocumentProcessingConfig: Configuration for Document understanding - // and enrichment. - DocumentProcessingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` - - // IdpConfig: Output only. Data store level identity provider config. - IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` - - // IndustryVertical: Immutable. The industry vertical that the data - // store registers. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - - // Name: Immutable. The full resource name of the data store. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - - // SolutionTypes: The solutions that the data store enrolls. Available - // solutions for each industry_vertical: * `MEDIA`: - // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * - // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. - // Other solutions cannot be enrolled. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionTypes []string `json:"solutionTypes,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResu +// ltChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // StartingSchema: The start schema to use for this DataStore when - // provisioning it. If unset, a default vertical specialized schema will - // be used. This field is only used by CreateDataStore API, and will be - // ignored if used in other APIs. This field will be omitted from all - // API responses including CreateDataStore API. To retrieve a schema of - // a DataStore, use SchemaService.GetSchema API instead. The provided - // schema will be validated against certain rules on schema. Learn more - // from this doc - // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). - StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "AclEnabled") to + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4150,8 +4182,8 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AclEnabled") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -4159,25 +4191,36 @@ type GoogleCloudDiscoveryengineV1alphaDataStore struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDataStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDataStore +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata: Metadata -// related to the progress of the DataStoreService.DeleteDataStore -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResu +// ltSnippetInfo: Snippet information. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo struct { + // Snippet: Snippet content. + Snippet string `json:"snippet,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // SnippetStatus: Status of the snippet defined by the search team. + SnippetStatus string `json:"snippetStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Snippet") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4185,7 +4228,7 @@ type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Snippet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4194,25 +4237,19 @@ type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata: Metadata -// related to the progress of the EngineService.DeleteEngine operation. -// This will be returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction: Search +// action. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction struct { + // Query: The query to search. + Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Query") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4220,8 +4257,8 @@ type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -4229,15 +4266,17 @@ type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata struct { +// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -4262,25 +4301,21 @@ type GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.DeleteTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata 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"` +// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest: +// Request message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest struct { + // Requests: Required. The request message specifying the resources to + // create. A maximum of 20 TargetSites can be created in a batch. + Requests []*GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Requests") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4288,7 +4323,7 @@ type GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Requests") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4297,25 +4332,20 @@ type GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This -// will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata 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"` +// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse: +// Response message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "TargetSites") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4323,90 +4353,64 @@ type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "TargetSites") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest: -// Request message for SiteSearchEngineService.DisableAdvancedSiteSearch +// GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest: +// Request message for SiteSearchEngineService.BatchVerifyTargetSites // method. -type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest struct { -} - -// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse: -// Response message for -// SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse struct { +type GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest struct { } -// GoogleCloudDiscoveryengineV1alphaDocument: Document captures all raw -// metadata information of items to be recommended or searched. -type GoogleCloudDiscoveryengineV1alphaDocument struct { - // AclInfo: Access control information for the document. - AclInfo *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo `json:"aclInfo,omitempty"` - - // Content: The unstructured data linked to this document. Content must - // be set if this document is under a `CONTENT_REQUIRED` data store. - Content *GoogleCloudDiscoveryengineV1alphaDocumentContent `json:"content,omitempty"` - - // DerivedStructData: Output only. This field is OUTPUT_ONLY. It - // contains derived data that are not in the original input document. - DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` - - // Id: Immutable. The identifier of the document. Id should conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length - // limit of 63 characters. - Id string `json:"id,omitempty"` - - // IndexTime: Output only. The last time the document was indexed. If - // this field is set, the document could be returned in search results. - // This field is OUTPUT_ONLY. If this field is not populated, it means - // the document has never been indexed. - IndexTime string `json:"indexTime,omitempty"` - - // JsonData: The JSON string representation of the document. It should - // conform to the registered Schema or an `INVALID_ARGUMENT` error is - // thrown. - JsonData string `json:"jsonData,omitempty"` +// GoogleCloudDiscoveryengineV1alphaBigQuerySource: BigQuery source +// import data from. +type GoogleCloudDiscoveryengineV1alphaBigQuerySource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for user event imports: * `user_event` (default): + // One UserEvent per row. Supported values for document imports: * + // `document` (default): One Document format per row. Each document must + // have a valid Document.id and one of Document.json_data or + // Document.struct_data. * `custom`: One custom data per row in + // arbitrary format that conforms to the defined Schema of the data + // store. This can only be used by the GENERIC Data Store vertical. + DataSchema string `json:"dataSchema,omitempty"` - // Name: Immutable. The full resource name of the document. Format: - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/branches/{branch}/documents/{document_id}`. This - // field must be a UTF-8 encoded string with a length limit of 1024 - // characters. - Name string `json:"name,omitempty"` + // DatasetId: Required. The BigQuery data set to copy the data from with + // a length limit of 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` - // ParentDocumentId: The identifier of the parent document. Currently - // supports at most two level document hierarchy. Id should conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length - // limit of 63 characters. - ParentDocumentId string `json:"parentDocumentId,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the BigQuery export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // SchemaId: The identifier of the schema located in the same data - // store. - SchemaId string `json:"schemaId,omitempty"` + // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in + // YYYY-MM-DD format. + PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` - // StructData: The structured JSON data for the document. It should - // conform to the registered Schema or an `INVALID_ARGUMENT` error is - // thrown. - StructData googleapi.RawMessage `json:"structData,omitempty"` + // ProjectId: The project ID (can be project # or ID) that the BigQuery + // source is in with a length limit of 128 characters. If not specified, + // inherits the project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // TableId: Required. The BigQuery table to copy the data from with a + // length limit of 1,024 characters. + TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "AclInfo") to + // ForceSendFields is a list of field names (e.g. "DataSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4414,7 +4418,7 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AclInfo") to include in + // NullFields is a list of field names (e.g. "DataSchema") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4423,19 +4427,25 @@ type GoogleCloudDiscoveryengineV1alphaDocument struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocument +func (s *GoogleCloudDiscoveryengineV1alphaBigQuerySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigQuerySource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentAclInfo: ACL Information of -// the Document. -type GoogleCloudDiscoveryengineV1alphaDocumentAclInfo struct { - // Readers: Readers of the document. - Readers []*GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction `json:"readers,omitempty"` +// GoogleCloudDiscoveryengineV1alphaBigtableOptions: The Bigtable +// Options object that contains information to support the import. +type GoogleCloudDiscoveryengineV1alphaBigtableOptions struct { + // Families: The mapping from family names to an object that contains + // column families level information for the given column family. If a + // family is not present in this map it will be ignored. + Families map[string]GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` - // ForceSendFields is a list of field names (e.g. "Readers") to + // KeyFieldName: The field name used for saving row key value in the + // document. The name has to match the pattern `a-zA-Z0-9*`. + KeyFieldName string `json:"keyFieldName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Families") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4443,7 +4453,7 @@ type GoogleCloudDiscoveryengineV1alphaDocumentAclInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Readers") to include in + // NullFields is a list of field names (e.g. "Families") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4452,29 +4462,55 @@ type GoogleCloudDiscoveryengineV1alphaDocumentAclInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfo +func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction: -// AclRestriction to model complex inheritance restrictions. Example: -// Modeling a "Both Permit" inheritance, where to access a child -// document, user needs to have access to parent document. Document -// Hierarchy - Space_S --> Page_P. Readers: Space_S: group_1, user_1 -// Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { -// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_1" -// }, { "user_id": "user_1" } ] } ] } } Page_P ACL Restriction. { -// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_2" -// }, { "group_id": "group_3" }, { "user_id": "user_2" } ], }, { -// "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ], -// } ] } } -type GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction struct { - // Principals: List of principals. - Principals []*GoogleCloudDiscoveryengineV1alphaPrincipal `json:"principals,omitempty"` +// GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn: The +// column of the Bigtable. +type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn struct { + // Encoding: The encoding mode of the values when the type is not + // `STRING`. Acceptable encoding values are: * `TEXT`: indicates values + // are alphanumeric text strings. * `BINARY`: indicates values are + // encoded using `HBase Bytes.toBytes` family of functions. This can be + // overridden for a specific column by listing that column in `columns` + // and specifying an encoding for it. + // + // Possible values: + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` - // ForceSendFields is a list of field names (e.g. "Principals") to + // FieldName: The field name to use for this column in the document. The + // name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed + // from the qualifier bytes with best effort. However, due to different + // naming patterns, field name collisions could happen, where parsing + // behavior is undefined. + FieldName string `json:"fieldName,omitempty"` + + // Qualifier: Required. Qualifier of the column. If it cannot be decoded + // with utf-8, use a base-64 encoded string instead. + Qualifier string `json:"qualifier,omitempty"` + + // Type: The type of values in this column family. The values are + // expected to be encoded using `HBase Bytes.toBytes` function when the + // encoding value is set to `BINARY`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Encoding") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4482,7 +4518,7 @@ type GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Principals") to include in + // NullFields is a list of field names (e.g. "Encoding") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4491,40 +4527,56 @@ type GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction +func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentContent: Unstructured data -// linked to this document. -type GoogleCloudDiscoveryengineV1alphaDocumentContent struct { - // MimeType: The MIME type of the content. Supported types: * - // `application/pdf` (PDF, only native PDFs are supported for now) * - // `text/html` (HTML) * - // `application/vnd.openxmlformats-officedocument.wordprocessingml.docume - // nt` (DOCX) * - // `application/vnd.openxmlformats-officedocument.presentationml.presenta - // tion` (PPTX) * `text/plain` (TXT) See - // https://www.iana.org/assignments/media-types/media-types.xhtml. - MimeType string `json:"mimeType,omitempty"` +// GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily: +// The column family of the Bigtable. +type GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily struct { + // Columns: The list of objects that contains column level information + // for each column. If a column is not present in this list it will be + // ignored. + Columns []*GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumn `json:"columns,omitempty"` - // RawBytes: The content represented as a stream of bytes. The maximum - // length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all - // `bytes` fields, this field is represented as pure binary in Protocol - // Buffers and base64-encoded string in JSON. For example, - // `abc123!?$*&()'-=@~` should be represented as - // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - RawBytes string `json:"rawBytes,omitempty"` + // Encoding: The encoding mode of the values when the type is not + // STRING. Acceptable encoding values are: * `TEXT`: indicates values + // are alphanumeric text strings. * `BINARY`: indicates values are + // encoded using `HBase Bytes.toBytes` family of functions. This can be + // overridden for a specific column by listing that column in `columns` + // and specifying an encoding for it. + // + // Possible values: + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` - // Uri: The URI of the content. Only Cloud Storage URIs (e.g. - // `gs://bucket-name/path/to/file`) are supported. The maximum file size - // is 2.5 MB for text-based formats, 100 MB for other formats. - Uri string `json:"uri,omitempty"` + // FieldName: The field name to use for this column family in the + // document. The name has to match the pattern `a-zA-Z0-9*`. If not set, + // it is parsed from the family name with best effort. However, due to + // different naming patterns, field name collisions could happen, where + // parsing behavior is undefined. + FieldName string `json:"fieldName,omitempty"` - // ForceSendFields is a list of field names (e.g. "MimeType") to + // Type: The type of values in this column family. The values are + // expected to be encoded using `HBase Bytes.toBytes` function when the + // encoding value is set to `BINARY`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Columns") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4532,7 +4584,7 @@ type GoogleCloudDiscoveryengineV1alphaDocumentContent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MimeType") to include in + // NullFields is a list of field names (e.g. "Columns") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4541,38 +4593,34 @@ type GoogleCloudDiscoveryengineV1alphaDocumentContent struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentContent +func (s *GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableOptionsBigtableColumnFamily raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document -// information associated with a user event. -type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { - // Id: The Document resource ID. - Id string `json:"id,omitempty"` - - // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id - // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ - // id}` - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaBigtableSource: The Cloud Bigtable +// source for importing data. +type GoogleCloudDiscoveryengineV1alphaBigtableSource struct { + // BigtableOptions: Required. Bigtable options that contains information + // needed when parsing data into typed structures. For example, column + // type annotations. + BigtableOptions *GoogleCloudDiscoveryengineV1alphaBigtableOptions `json:"bigtableOptions,omitempty"` - // PromotionIds: The promotion IDs associated with this Document. - // Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` + // InstanceId: Required. The instance ID of the Cloud Bigtable that + // needs to be imported. + InstanceId string `json:"instanceId,omitempty"` - // Quantity: Quantity of the Document associated with the user event. - // Defaults to 1. For example, this field will be 2 if two quantities of - // the same Document are involved in a `add-to-cart` event. Required for - // events of the following event types: * `add-to-cart` * `purchase` - Quantity int64 `json:"quantity,omitempty"` + // ProjectId: The project ID that the Bigtable source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` - // Uri: The Document URI - only allowed for website data stores. - Uri string `json:"uri,omitempty"` + // TableId: Required. The table ID of the Cloud Bigtable that needs to + // be imported. + TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Id") to + // ForceSendFields is a list of field names (e.g. "BigtableOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4580,56 +4628,36 @@ type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BigtableOptions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentInfo +func (s *GoogleCloudDiscoveryengineV1alphaBigtableSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBigtableSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig: A -// singleton resource of DataStore. It's empty when DataStore is -// created, which defaults to digital parser. The first call to -// DataStoreService.UpdateDocumentProcessingConfig method will -// initialize the config. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { - // ChunkingConfig: Whether chunking mode is enabled. - ChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` - - // DefaultParsingConfig: Configurations for default Document parser. If - // not specified, we will configure it as default DigitalParsingConfig, - // and the default parsing config will be applied to all file types for - // Document parsing. - DefaultParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - - // Name: The full resource name of the Document Processing Config. - // Format: - // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC - // onfig`. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest: Request +// message for GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest struct { + // AnswerCandidate: Answer candidate to check. + AnswerCandidate string `json:"answerCandidate,omitempty"` - // ParsingConfigOverrides: Map from file type to override the default - // parsing configuration based on the file type. Supported keys: * - // `pdf`: Override parsing config for PDF files, either digital parsing, - // ocr parsing or layout parsing is supported. * `html`: Override - // parsing config for HTML files, only digital parsing and or layout - // parsing are supported. * `docx`: Override parsing config for DOCX - // files, only digital parsing and or layout parsing are supported. - ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + // Facts: List of facts for the grounding check. We support up to 200 + // facts. + Facts []*GoogleCloudDiscoveryengineV1alphaGroundingFact `json:"facts,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // GroundingSpec: Configuration of the grounding check. + GroundingSpec *GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec `json:"groundingSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to + // ForceSendFields is a list of field names (e.g. "AnswerCandidate") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4637,7 +4665,7 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkingConfig") to + // NullFields is a list of field names (e.g. "AnswerCandidate") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -4647,58 +4675,34 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi -// g: Configuration for chunking config. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig struct { - // LayoutBasedChunkingConfig: Configuration for the layout based - // chunking. - LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "LayoutBasedChunkingConfig") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "LayoutBasedChunkingConfig") to include in API requests with the JSON - // null value. By default, fields with empty values are omitted from API - // requests. However, any field with an empty value appearing in - // NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} +// GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse: Response +// message for the GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse struct { + // CitedChunks: List of facts cited across all claims in the answer + // candidate. These are derived from the facts supplied in the request. + CitedChunks []*GoogleCloudDiscoveryengineV1alphaFactChunk `json:"citedChunks,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Claims: Claim texts and citation info across all claims in the answer + // candidate. + Claims []*GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim `json:"claims,omitempty"` -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi -// gLayoutBasedChunkingConfig: Configuration for the layout based -// chunking. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { - // ChunkSize: The token size limit for each chunk. Supported values: - // 100-500 (inclusive). Default value: 500. - ChunkSize int64 `json:"chunkSize,omitempty"` + // SupportScore: The support score for the input answer candidate. + // Higher the score, higher is the fraction of claims that are supported + // by the provided facts. This is always set when a response is + // returned. + SupportScore float64 `json:"supportScore,omitempty"` - // IncludeAncestorHeadings: Whether to include appending different - // levels of headings to chunks from the middle of the document to - // prevent context loss. Default value: False. - IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ChunkSize") to + // ForceSendFields is a list of field names (e.g. "CitedChunks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4706,160 +4710,165 @@ type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayo // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkSize") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CitedChunks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig -// : Related configurations applied to a specific type of document -// parser. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig struct { - // DigitalParsingConfig: Configurations applied to digital parser. - DigitalParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - - // LayoutParsingConfig: Configurations applied to layout parser. - LayoutParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` - - // OcrParsingConfig: Configurations applied to OCR parser. Currently it - // only applies to PDFs. - OcrParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "DigitalParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DigitalParsingConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse + var s1 struct { + SupportScore gensupport.JSONFloat64 `json:"supportScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SupportScore = float64(s1.SupportScore) + return nil } -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig -// DigitalParsingConfig: The digital parsing configurations for -// documents. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { -} +// GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim: Text +// and citation info for a claim in the answer candidate. +type GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim struct { + // CitationIndices: A list of indices (into 'cited_chunks') specifying + // the citations associated with the claim. For instance [1,3,4] means + // that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts + // cited supporting for the claim. A citation to a fact indicates that + // the claim is supported by the fact. + CitationIndices []int64 `json:"citationIndices,omitempty"` -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig -// LayoutParsingConfig: The layout parsing configurations for documents. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { -} + // ClaimText: Text for the claim in the answer candidate. Always + // provided regardless of whether citations or anti-citations are found. + ClaimText string `json:"claimText,omitempty"` -// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig -// OcrParsingConfig: The OCR parsing configurations for documents. -type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { - // EnhancedDocumentElements: Apply additional enhanced OCR processing to - // a list of document elements. Supported values: * `table`: advanced - // table parsing model. - EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + // EndPos: Position indicating the end of the claim in the answer + // candidate, exclusive. + EndPos int64 `json:"endPos,omitempty"` - // UseNativeText: If true, will use native text instead of OCR text on - // pages containing native text. - UseNativeText bool `json:"useNativeText,omitempty"` + // StartPos: Position indicating the start of the claim in the answer + // candidate, measured in bytes/unicode. + StartPos int64 `json:"startPos,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnhancedDocumentElements") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "CitationIndices") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnhancedDocumentElements") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "CitationIndices") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingResponseClaim raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaDoubleList: Double list. -type GoogleCloudDiscoveryengineV1alphaDoubleList struct { - // Values: Double values. - Values []float64 `json:"values,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec: Specification +// for the grounding check. +type GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec struct { + // CitationThreshold: The threshold (in [0,1]) used for determining + // whether a fact must be cited for a claim in the answer candidate. + // Choosing a higher threshold will lead to fewer but very strong + // citations, while choosing a lower threshold may lead to more but + // somewhat weaker citations. If unset, the threshold will default to + // 0.6. + CitationThreshold float64 `json:"citationThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CitationThreshold") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Values") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CitationThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaDoubleList +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaDoubleList +func (s *GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaCheckGroundingSpec var s1 struct { - Values []gensupport.JSONFloat64 `json:"values"` + CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Values = make([]float64, len(s1.Values)) - for i := range s1.Values { - s.Values[i] = float64(s1.Values[i]) - } + s.CitationThreshold = float64(s1.CitationThreshold) return nil } -// GoogleCloudDiscoveryengineV1alphaEmbeddingConfig: Defines embedding -// config, used for bring your own embeddings feature. -type GoogleCloudDiscoveryengineV1alphaEmbeddingConfig struct { - // FieldPath: Full field path in the schema mapped as embedding field. - FieldPath string `json:"fieldPath,omitempty"` +// GoogleCloudDiscoveryengineV1alphaChunk: Chunk captures all raw +// metadata information of items to be recommended or searched in the +// chunk mode. +type GoogleCloudDiscoveryengineV1alphaChunk struct { + // ChunkMetadata: Output only. Metadata of the current chunk. + ChunkMetadata *GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata `json:"chunkMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // Content: Content is a string from a document (parsed content). + Content string `json:"content,omitempty"` + + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It + // contains derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + + // DocumentMetadata: Metadata of the document from the current chunk. + DocumentMetadata *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata `json:"documentMetadata,omitempty"` + + // Id: Unique chunk ID of the current chunk. + Id string `json:"id,omitempty"` + + // Name: The full resource name of the chunk. Format: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/branches/{branch}/documents/{document_id}/chunks/{ + // chunk_id}`. This field must be a UTF-8 encoded string with a length + // limit of 1024 characters. + Name string `json:"name,omitempty"` + + // PageSpan: Page span of the chunk. + PageSpan *GoogleCloudDiscoveryengineV1alphaChunkPageSpan `json:"pageSpan,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ChunkMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4867,34 +4876,38 @@ type GoogleCloudDiscoveryengineV1alphaEmbeddingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ChunkMetadata") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEmbeddingConfig +func (s *GoogleCloudDiscoveryengineV1alphaChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata: Metadata of the +// current chunk. This field is only populated on SearchService.Search +// API. +type GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata struct { + // NextChunks: The next chunks of the current chunk. The number is + // controlled by + // SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field + // is only populated on SearchService.Search API. + NextChunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"nextChunks,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PreviousChunks: The previous chunks of the current chunk. The number + // is controlled by + // SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This + // field is only populated on SearchService.Search API. + PreviousChunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"previousChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "NextChunks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -4902,7 +4915,7 @@ type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "NextChunks") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -4911,119 +4924,23 @@ type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunkChunkMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest: -// Request message for SiteSearchEngineService.EnableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest struct { -} - -// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse: -// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the -// training and serving parameters of an Engine. -type GoogleCloudDiscoveryengineV1alphaEngine struct { - // ChatEngineConfig: Configurations for the Chat Engine. Only applicable - // if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - - // ChatEngineMetadata: Output only. Additional information of the Chat - // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - - // CommonConfig: Common config spec that specifies the metadata of the - // engine. - CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` - - // CreateTime: Output only. Timestamp the Recommendation Engine was - // created at. - CreateTime string `json:"createTime,omitempty"` - - // DataStoreIds: The data stores associated with this engine. For - // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of - // engines, they can only associate with at most one data store. If - // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same - // Collection can be associated here. Note that when used in - // CreateEngineRequest, one DataStore id must be provided as the system - // will use it for necessary initializations. - DataStoreIds []string `json:"dataStoreIds,omitempty"` - - // DisplayName: Required. The display name of the engine. Should be - // human readable. UTF-8 encoded string with limit of 1024 characters. - DisplayName string `json:"displayName,omitempty"` - - // IndustryVertical: The industry vertical that the engine registers. - // The restriction of the Engine industry vertical is based on - // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine - // has to match vertical of the DataStore liniked to the engine. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - - // MediaRecommendationEngineConfig: Configurations for the Media Engine. - // Only applicable on the data stores with solution_type - // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. - MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` - - // Name: Immutable. The fully qualified resource name of the engine. - // This field must be a UTF-8 encoded string with a length limit of 1024 - // characters. Format: - // `projects/{project_number}/locations/{location}/collections/{collectio - // n}/engines/{engine}` engine should be 1-63 characters, and valid - // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is - // returned. - Name string `json:"name,omitempty"` - - // RecommendationMetadata: Output only. Additional information of a - // recommendation engine. Only applicable if solution_type is - // SOLUTION_TYPE_RECOMMENDATION. - RecommendationMetadata *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata `json:"recommendationMetadata,omitempty"` - - // SearchEngineConfig: Configurations for the Search Engine. Only - // applicable if solution_type is SOLUTION_TYPE_SEARCH. - SearchEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` - - // SimilarDocumentsConfig: Additional config specs for a `similar-items` - // engine. - SimilarDocumentsConfig *GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig `json:"similarDocumentsConfig,omitempty"` - - // SolutionType: Required. The solutions of the engine. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionType string `json:"solutionType,omitempty"` - - // UpdateTime: Output only. Timestamp the Recommendation Engine was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata: Document +// metadata contains the information of the document of the current +// chunk. +type GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata struct { + // Title: Title of the document. + Title string `json:"title,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Uri: Uri of the document. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // ForceSendFields is a list of field names (e.g. "Title") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5031,98 +4948,87 @@ type GoogleCloudDiscoveryengineV1alphaEngine struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChatEngineConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Title") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngine +func (s *GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunkDocumentMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig: -// Configurations for a Chat Engine. -type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig struct { - // AgentCreationConfig: The configurationt generate the Dialogflow agent - // that is associated to this Engine. Note that these configurations are - // one-time consumed by and passed to Dialogflow service. It means they - // cannot be retrieved using EngineService.GetEngine or - // EngineService.ListEngines API after engine creation. - AgentCreationConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaChunkPageSpan: Page span of the +// chunk. +type GoogleCloudDiscoveryengineV1alphaChunkPageSpan struct { + // PageEnd: The end page of the chunk. + PageEnd int64 `json:"pageEnd,omitempty"` - // DialogflowAgentToLink: The resource name of an exist Dialogflow agent - // to link to this Chat Engine. Customers can either provide - // `agent_creation_config` to create agent or provide an agent name that - // links the agent with the Chat engine. Format: - // `projects//locations//agents/`. Note that the - // `dialogflow_agent_to_link` are one-time consumed by and passed to - // Dialogflow service. It means they cannot be retrieved using - // EngineService.GetEngine or EngineService.ListEngines API after engine - // creation. Please use ChatEngineMetadata.dialogflow_agent for actual - // agent association after Engine is created. - DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + // PageStart: The start page of the chunk. + PageStart int64 `json:"pageStart,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "PageEnd") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AgentCreationConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "PageEnd") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig +func (s *GoogleCloudDiscoveryengineV1alphaChunkPageSpan) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaChunkPageSpan raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationCo -// nfig: Configurations for generating a Dialogflow agent. Note that -// these configurations are one-time consumed by and passed to -// Dialogflow service. It means they cannot be retrieved using -// EngineService.GetEngine or EngineService.ListEngines API after engine -// creation. -type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig struct { - // Business: Name of the company, organization or other entity that the - // agent represents. Used for knowledge connector LLM prompt and for - // knowledge search. - Business string `json:"business,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCloudSqlSource: Cloud SQL source +// import data from. +type GoogleCloudDiscoveryengineV1alphaCloudSqlSource struct { + // DatabaseId: Required. The Cloud SQL database to copy the data from + // with a length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` - // DefaultLanguageCode: Required. The default language of the agent as a - // language tag. See Language Support - // (https://cloud.google.com/dialogflow/docs/reference/language) for a - // list of the currently supported language codes. - DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the Cloud SQL export to a specific Cloud Storage + // directory. Please ensure that the Cloud SQL service account has the + // necessary Cloud Storage Admin permissions to access the specified + // Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // Location: Agent location for Agent creation, supported values: - // global/us/eu. If not provided, us Engine will create Agent using - // us-central-1 by default; eu Engine will create Agent using eu-west-1 - // by default. - Location string `json:"location,omitempty"` + // InstanceId: Required. The Cloud SQL instance to copy the data from + // with a length limit of 256 characters. + InstanceId string `json:"instanceId,omitempty"` - // TimeZone: Required. The time zone of the agent from the time zone - // database (https://www.iana.org/time-zones), e.g., America/New_York, - // Europe/Paris. - TimeZone string `json:"timeZone,omitempty"` + // Offload: Option for serverless export. Enabling this option will + // incur additional cost. More info can be found here + // (https://cloud.google.com/sql/pricing#serverless). + Offload bool `json:"offload,omitempty"` - // ForceSendFields is a list of field names (e.g. "Business") to + // ProjectId: The project ID that the Cloud SQL source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The Cloud SQL table to copy the data from with a + // length limit of 256 characters. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5130,7 +5036,7 @@ type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Business") to include in + // NullFields is a list of field names (e.g. "DatabaseId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5139,20 +5045,57 @@ type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig +func (s *GoogleCloudDiscoveryengineV1alphaCloudSqlSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCloudSqlSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata: Additional -// information of a Chat Engine. Fields in this message are output only. -type GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata struct { - // DialogflowAgent: The resource name of a Dialogflow agent, that this - // Chat Engine refers to. Format: `projects//locations//agents/`. - DialogflowAgent string `json:"dialogflowAgent,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest: Request +// message for CompletionService.CompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest struct { + // DataStore: Required. The parent data store resource name for which + // the completion is performed, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store`. + DataStore string `json:"dataStore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to + // 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. + IncludeTailSuggestions bool `json:"includeTailSuggestions,omitempty"` + + // Query: Required. The typeahead input used to fetch suggestions. + // Maximum length is 128 characters. + Query string `json:"query,omitempty"` + + // 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. + QueryModel string `json:"queryModel,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. This should be the same identifier as + // UserEvent.user_pseudo_id and 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. + UserPseudoId string `json:"userPseudoId,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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5160,31 +5103,39 @@ type GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DialogflowAgent") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DataStore") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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 string `json:"companyName,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse: Response +// message for CompletionService.CompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse struct { + // QuerySuggestions: Results of the matched query suggestions. The + // result list is ordered and the first result is a top suggestion. + QuerySuggestions []*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompanyName") to + // TailMatchTriggered: True if the returned suggestions are all tail + // suggestions. For tail matching to be triggered, + // include_tail_suggestions in the request must be true and there must + // be no suggestions that match the full query. + TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5192,64 +5143,37 @@ type GoogleCloudDiscoveryengineV1alphaEngineCommonConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompanyName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "QuerySuggestions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineCommonConfig +func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig -// : Additional config specs for a Media Recommendation engine. -type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig struct { - // OptimizationObjective: The optimization objective. e.g., `cvr`. This - // field together with optimization_objective describe engine metadata - // to use to control engine training and serving. Currently supported - // values: `ctr`, `cvr`. If not specified, we choose default based on - // engine type. Default depends on type of recommendation: - // `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` - OptimizationObjective string `json:"optimizationObjective,omitempty"` - - // OptimizationObjectiveConfig: Name and value of the custom threshold - // for cvr optimization_objective. For target_field `watch-time`, - // target_field_value must be an integer value indicating the media - // progress time in seconds between (0, 86400] (excludes 0, includes - // 86400) (e.g., 90). For target_field `watch-percentage`, the - // target_field_value must be a valid float value between (0, 1.0] - // (excludes 0, includes 1.0) (e.g., 0.5). - OptimizationObjectiveConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig `json:"optimizationObjectiveConfig,omitempty"` - - // TrainingState: The training state that the engine is in (e.g. - // `TRAINING` or `PAUSED`). Since part of the cost of running the - // service is frequency of training - this can be used to determine when - // to train engine in order to control cost. If not specified: the - // default value for `CreateEngine` method is `TRAINING`. The default - // value for `UpdateEngine` method is to keep the state the same as - // before. - // - // Possible values: - // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. - // "PAUSED" - The engine training is paused. - // "TRAINING" - The engine is training. - TrainingState string `json:"trainingState,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion: +// +// Suggestions as search queries. +type GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion struct { + // CompletableFieldPaths: The unique document field paths that serve as + // the source of this suggestion if it was generated from completable + // fields. This field is only populated for the document-completable + // model. + CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` - // Type: Required. The type of engine. e.g., `recommended-for-you`. This - // field together with optimization_objective describe engine metadata - // to use to control engine training and serving. Currently supported - // values: `recommended-for-you`, `others-you-may-like`, - // `more-like-this`, `most-popular-items`. - Type string `json:"type,omitempty"` + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` // ForceSendFields is a list of field names (e.g. - // "OptimizationObjective") to unconditionally include in API requests. + // "CompletableFieldPaths") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -5257,7 +5181,7 @@ type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig stru // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "OptimizationObjective") to + // NullFields is a list of field names (e.g. "CompletableFieldPaths") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -5267,25 +5191,26 @@ type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +func (s *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompleteQueryResponseQuerySuggestion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig -// OptimizationObjectiveConfig: Custom threshold for `cvr` -// optimization_objective. -type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig struct { - // TargetField: Required. The name of the field to target. Currently - // supported values: `watch-percentage`, `watch-time`. - TargetField string `json:"targetField,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCompletionInfo: Detailed completion +// information including completion attribution token and clicked +// completion info. +type GoogleCloudDiscoveryengineV1alphaCompletionInfo struct { + // SelectedPosition: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion position, starting + // from 0. + SelectedPosition int64 `json:"selectedPosition,omitempty"` - // TargetFieldValueFloat: Required. The threshold to be applied to the - // target (e.g., 0.5). - TargetFieldValueFloat float64 `json:"targetFieldValueFloat,omitempty"` + // SelectedSuggestion: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion. + SelectedSuggestion string `json:"selectedSuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetField") to + // ForceSendFields is a list of field names (e.g. "SelectedPosition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5293,78 +5218,57 @@ type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptim // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetField") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "SelectedPosition") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig +func (s *GoogleCloudDiscoveryengineV1alphaCompletionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCompletionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig - var s1 struct { - TargetFieldValueFloat gensupport.JSONFloat64 `json:"targetFieldValueFloat"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.TargetFieldValueFloat = float64(s1.TargetFieldValueFloat) - return nil -} +// GoogleCloudDiscoveryengineV1alphaConversation: External conversation +// proto definition. +type GoogleCloudDiscoveryengineV1alphaConversation struct { + // EndTime: Output only. The time the conversation finished. + EndTime string `json:"endTime,omitempty"` -// GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata: -// Additional information of a recommendation engine. -type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { - // DataState: Output only. The state of data requirements for this - // engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the - // data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state - // even if serving state is `ACTIVE`: engines were trained successfully - // before, but cannot be refreshed because the underlying engine no - // longer has sufficient data for training. - // - // Possible values: - // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never - // be explicitly set. - // "DATA_OK" - The engine has sufficient training data. - // "DATA_ERROR" - The engine does not have sufficient training data. - // Error messages can be queried via Stackdriver. - DataState string `json:"dataState,omitempty"` + // Messages: Conversation messages. + Messages []*GoogleCloudDiscoveryengineV1alphaConversationMessage `json:"messages,omitempty"` - // LastTuneTime: Output only. The timestamp when the latest successful - // tune finished. Only applicable on Media Recommendation engines. - LastTuneTime string `json:"lastTuneTime,omitempty"` + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/dataStore/*/conve + // rsations/*` or + // `project/*/locations/global/collections/{collection}/engines/*/convers + // ations/*`. + Name string `json:"name,omitempty"` - // ServingState: Output only. The serving state of the engine: `ACTIVE`, - // `NOT_ACTIVE`. + // StartTime: Output only. The time the conversation started. + StartTime string `json:"startTime,omitempty"` + + // State: The state of the Conversation. // // Possible values: - // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. - // "INACTIVE" - The engine is not serving. - // "ACTIVE" - The engine is serving and can be queried. - // "TUNED" - The engine is trained on tuned hyperparameters and can be - // queried. - ServingState string `json:"servingState,omitempty"` + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Conversation is currently open. + // "COMPLETED" - Conversation has been completed. + State string `json:"state,omitempty"` - // TuningOperation: Output only. The latest tune operation id associated - // with the engine. Only applicable on Media Recommendation engines. If - // present, this operation id can be used to determine if there is an - // ongoing tune for this engine. To check the operation status, send the - // GetOperation request with this operation id in the engine resource - // format. If no tuning has happened for this engine, the string is - // empty. - TuningOperation string `json:"tuningOperation,omitempty"` + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataState") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5372,7 +5276,7 @@ type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataState") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5381,36 +5285,24 @@ type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata +func (s *GoogleCloudDiscoveryengineV1alphaConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConversation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig: -// Configurations for a Search Engine. -type GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig struct { - // SearchAddOns: The add-on that this search engine enables. - // - // Possible values: - // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_ADD_ON_LLM" - Large language model add-on. - SearchAddOns []string `json:"searchAddOns,omitempty"` +// GoogleCloudDiscoveryengineV1alphaConversationContext: Defines context +// of the conversation +type GoogleCloudDiscoveryengineV1alphaConversationContext struct { + // ActiveDocument: The current active document the user opened. It + // contains the document resource reference. + ActiveDocument string `json:"activeDocument,omitempty"` - // SearchTier: The search feature tier of this engine. Different tiers - // might have different pricing. To learn more, please check the pricing - // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not - // specified. - // - // Possible values: - // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_TIER_STANDARD" - Standard tier. - // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. - SearchTier string `json:"searchTier,omitempty"` + // 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. "SearchAddOns") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5418,33 +5310,34 @@ type GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchAddOns") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ActiveDocument") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig +func (s *GoogleCloudDiscoveryengineV1alphaConversationContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConversationContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig: -// Additional config specs for a `similar-items` engine. -type GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig struct { -} - -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata: Metadata -// related to the progress of the EstimateDataSize operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1alphaConversationMessage: Defines a +// conversation message. +type GoogleCloudDiscoveryengineV1alphaConversationMessage struct { + // CreateTime: Output only. Message creation timestamp. CreateTime string `json:"createTime,omitempty"` + // Reply: Search reply. + Reply *GoogleCloudDiscoveryengineV1alphaReply `json:"reply,omitempty"` + + // UserInput: User text input. + UserInput *GoogleCloudDiscoveryengineV1alphaTextInput `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. However, any @@ -5462,22 +5355,85 @@ type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata +func (s *GoogleCloudDiscoveryengineV1alphaConversationMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConversationMessage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest: Request -// message for EstimateBillingService.EstimateDataSize method -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest struct { - // FileDataSource: Structured or unstructured data. - FileDataSource *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource `json:"fileDataSource,omitempty"` +// GoogleCloudDiscoveryengineV1alphaConverseConversationRequest: Request +// message for ConversationalSearchService.ConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaConverseConversationRequest 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 *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // WebsiteDataSource: Website data. - WebsiteDataSource *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource `json:"websiteDataSource,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 *GoogleCloudDiscoveryengineV1alphaConversation `json:"conversation,omitempty"` - // ForceSendFields is a list of field names (e.g. "FileDataSource") to + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. This will be + // used to filter search results which may affect the summary response. + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + // Filtering in Vertex AI Search is done by mapping the LHS filter key + // to a key property defined in the Vertex AI Search backend -- this + // mapping is defined by the customer in their schema. For example a + // media customer might have a field 'name' in their schema. In this + // case the filter would look like this: filter --> name:'ANY("king + // kong")' For more information about filtering including syntax and + // filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + + // Name: Required. The resource name of the Conversation to get. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/conversations/{conversation_id}`. + // Use + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/conversations/-` to activate auto + // session mode, which automatically creates a new conversation inside a + // ConverseConversation session. + Name string `json:"name,omitempty"` + + // Query: Required. Current user input. + Query *GoogleCloudDiscoveryengineV1alphaTextInput `json:"query,omitempty"` + + // SafeSearch: Whether to turn on safe search. + SafeSearch bool `json:"safeSearch,omitempty"` + + // ServingConfig: The resource name of the Serving Config to use. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + // If this is not set, the default serving config will be used. + ServingConfig string `json:"servingConfig,omitempty"` + + // SummarySpec: A specification for configuring the summary returned in + // the response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5485,32 +5441,42 @@ type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FileDataSource") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest +func (s *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConverseConversationRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource -// : Data source contains files either in Cloud Storage or BigQuery. -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` +// GoogleCloudDiscoveryengineV1alphaConverseConversationResponse: +// Response message for ConversationalSearchService.ConverseConversation +// method. +type GoogleCloudDiscoveryengineV1alphaConverseConversationResponse struct { + // Conversation: Updated conversation including the answer. + Conversation *GoogleCloudDiscoveryengineV1alphaConversation `json:"conversation,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigquerySource") to + // Reply: Answer to the current query. + Reply *GoogleCloudDiscoveryengineV1alphaReply `json:"reply,omitempty"` + + // SearchResults: Search Results. + SearchResults []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"searchResults,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Conversation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5518,73 +5484,34 @@ type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigquerySource") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Conversation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource +func (s *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaConverseConversationResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSou -// rce: Data source is a set of website patterns that we crawl to get -// the total number of websites. -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource struct { - // EstimatorUriPatterns: Required. The URI patterns to estimate the data - // sizes. At most 10 patterns are allowed, otherwise an INVALID_ARGUMENT - // error is thrown. - EstimatorUriPatterns []*GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern `json:"estimatorUriPatterns,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EstimatorUriPatterns") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EstimatorUriPatterns") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSou -// rceEstimatorUriPattern: URI patterns that we use to crawl. -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern struct { - // ExactMatch: Whether we infer the generated URI or use the exact - // provided one. - ExactMatch bool `json:"exactMatch,omitempty"` - - // Exclusive: Whether the pattern is exclusive or not. If set to true, - // the pattern is considered exclusive. If unset or set to false, the - // pattern is considered inclusive by default. - Exclusive bool `json:"exclusive,omitempty"` +// 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"` - // ProvidedUriPattern: User provided URI pattern. For example, - // `foo.com/bar/*`. - ProvidedUriPattern string `json:"providedUriPattern,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. "ExactMatch") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5592,7 +5519,7 @@ type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEs // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5601,69 +5528,25 @@ type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEs NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse: Response -// of the EstimateDataSize request. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse struct { - // DataSizeBytes: Data size in terms of bytes. - DataSizeBytes int64 `json:"dataSizeBytes,omitempty,string"` - - // DocumentCount: Total number of documents. - DocumentCount int64 `json:"documentCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "DataSizeBytes") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "DataSizeBytes") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse +func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse -// : Response message for -// SiteSearchEngineService.FetchDomainVerificationStatus method. -type GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TargetSites: List of TargetSites containing the site verification - // status. - TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` - - // TotalSize: The total number of items matching the request. This will - // always be populated in the response. - TotalSize int64 `json:"totalSize,omitempty"` +// 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"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5671,37 +5554,32 @@ type GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse +func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFhirStoreSource: Cloud FhirStore -// source import data from. -type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { - // FhirStore: Required. The full resource name of the FHIR store to - // import data from, in the format of - // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores - // /{fhir_store}`. - FhirStore string `json:"fhirStore,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for +// Create Schema LRO. +type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the - // import with a length limit of 2,000 characters. Can be specified if - // one wants to have the FhirStore export to a specific Cloud Storage - // directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // 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. "FhirStore") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5709,7 +5587,7 @@ type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FhirStore") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5718,203 +5596,25 @@ type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaFhirStoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFhirStoreSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for -// fields of a schema. For example, configuring a field is indexable, or -// searchable. -type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { - // CompletableOption: If completable_option is COMPLETABLE_ENABLED, - // field values are directly used and returned as suggestions for - // Autocomplete in CompletionService.CompleteQuery. If - // completable_option is unset, the server behavior defaults to - // COMPLETABLE_DISABLED for fields that support setting completable - // options, which are just `string` fields. For those fields that do not - // support setting completable options, the server will skip completable - // option setting, and setting completable_option for those fields will - // throw `INVALID_ARGUMENT` error. - // - // Possible values: - // "COMPLETABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "COMPLETABLE_ENABLED" - Completable option enabled for a schema - // field. - // "COMPLETABLE_DISABLED" - Completable option disabled for a schema - // field. - CompletableOption string `json:"completableOption,omitempty"` - - // DynamicFacetableOption: If dynamic_facetable_option is - // DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic - // facet. Could only be DYNAMIC_FACETABLE_DISABLED if - // FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an - // `INVALID_ARGUMENT` error will be returned. If - // dynamic_facetable_option is unset, the server behavior defaults to - // DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic - // facetable options. For those fields that do not support setting - // dynamic facetable options, such as `object` and `boolean`, the server - // will skip dynamic facetable option setting, and setting - // dynamic_facetable_option for those fields will throw - // `INVALID_ARGUMENT` error. - // - // Possible values: - // "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for - // a schema field. - // "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled - // for a schema field. - DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` - - // FieldPath: Required. Field path of the schema field. For example: - // `title`, `description`, `release_info.release_year`. - FieldPath string `json:"fieldPath,omitempty"` - - // FieldType: Output only. Raw type of the field. - // - // Possible values: - // "FIELD_TYPE_UNSPECIFIED" - Field type is unspecified. - // "OBJECT" - Field value type is Object. - // "STRING" - Field value type is String. - // "NUMBER" - Field value type is Number. - // "INTEGER" - Field value type is Integer. - // "BOOLEAN" - Field value type is Boolean. - // "GEOLOCATION" - Field value type is Geolocation. - // "DATETIME" - Field value type is Datetime. - FieldType string `json:"fieldType,omitempty"` - - // IndexableOption: If indexable_option is INDEXABLE_ENABLED, field - // values are indexed so that it can be filtered or faceted in - // SearchService.Search. If indexable_option is unset, the server - // behavior defaults to INDEXABLE_DISABLED for fields that support - // setting indexable options. For those fields that do not support - // setting indexable options, such as `object` and `boolean` and key - // properties, the server will skip indexable_option setting, and - // setting indexable_option for those fields will throw - // `INVALID_ARGUMENT` error. - // - // Possible values: - // "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "INDEXABLE_ENABLED" - Indexable option enabled for a schema field. - // "INDEXABLE_DISABLED" - Indexable option disabled for a schema - // field. - IndexableOption string `json:"indexableOption,omitempty"` - - // KeyPropertyType: Output only. Type of the key property that this - // field is mapped to. Empty string if this is not annotated as mapped - // to a key property. Example types are `title`, `description`. Full - // list is defined by `keyPropertyMapping` in the schema field - // annotation. If the schema field has a `KeyPropertyMapping` - // annotation, `indexable_option` and `searchable_option` of this field - // cannot be modified. - KeyPropertyType string `json:"keyPropertyType,omitempty"` - - // RecsFilterableOption: If recs_filterable_option is - // FILTERABLE_ENABLED, field values are filterable by filter expression - // in RecommendationService.Recommend. If FILTERABLE_ENABLED but the - // field type is numerical, field values are not filterable by text - // queries in RecommendationService.Recommend. Only textual fields are - // supported. If recs_filterable_option is unset, the default setting is - // FILTERABLE_DISABLED for fields that support setting filterable - // options. When a field set to [FILTERABLE_DISABLED] is filtered, a - // warning is generated and an empty result is returned. - // - // Possible values: - // "FILTERABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "FILTERABLE_ENABLED" - Filterable option enabled for a schema - // field. - // "FILTERABLE_DISABLED" - Filterable option disabled for a schema - // field. - RecsFilterableOption string `json:"recsFilterableOption,omitempty"` - - // RetrievableOption: If retrievable_option is RETRIEVABLE_ENABLED, - // field values are included in the search results. If - // retrievable_option is unset, the server behavior defaults to - // RETRIEVABLE_DISABLED for fields that support setting retrievable - // options. For those fields that do not support setting retrievable - // options, such as `object` and `boolean`, the server will skip - // retrievable option setting, and setting retrievable_option for those - // fields will throw `INVALID_ARGUMENT` error. - // - // Possible values: - // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema - // field. - // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema - // field. - RetrievableOption string `json:"retrievableOption,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 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. - // - // Possible values: - // "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. - // "SEARCHABLE_ENABLED" - Searchable option enabled for a schema - // field. - // "SEARCHABLE_DISABLED" - Searchable option disabled for a schema - // field. - SearchableOption string `json:"searchableOption,omitempty"` - - // ForceSendFields is a list of field names (e.g. "CompletableOption") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CompletableOption") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFieldConfig +func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaFirestoreSource: Firestore source -// import data from. -type GoogleCloudDiscoveryengineV1alphaFirestoreSource struct { - // CollectionId: Required. The Firestore collection to copy the data - // from with a length limit of 1500 characters. - CollectionId string `json:"collectionId,omitempty"` - - // DatabaseId: Required. The Firestore database to copy the data from - // with a length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` - - // GcsStagingDir: Optional. Intermediate Cloud Storage directory used - // for the import with a length limit of 2,000 characters. Can be - // specified if one wants to have the Firestore export to a specific - // Cloud Storage directory. Please ensure that the Firestore service - // account has the necessary GCS Storage Admin permissions to access the - // specified GCS directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` +// 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"` - // ProjectId: Optional. The project ID (can be project # or ID) that the - // Cloud SQL source is in with a length limit of 128 characters. If not - // specified, inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` + // 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. "CollectionId") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5922,48 +5622,33 @@ type GoogleCloudDiscoveryengineV1alphaFirestoreSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CollectionId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaFirestoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaFirestoreSource +func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaGcsSource: Cloud Storage location -// for input content. -type GoogleCloudDiscoveryengineV1alphaGcsSource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for document imports: * `document` (default): One - // JSON Document per line. Each document must have a valid Document.id. - // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - // `input_uris` becomes a document, with the ID set to the first 128 - // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom - // data JSON per row in arbitrary format that conforms to the defined - // Schema of the data store. This can only be used by Gen App Builder. * - // `csv`: A CSV file with header conforming to the defined Schema of the - // data store. Each entry after the header is imported as a Document. - // This can only be used by Gen App Builder. Supported values for user - // even imports: * `user_event` (default): One JSON UserEvent per line. - DataSchema string `json:"dataSchema,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest: Request +// message for SiteSearchEngineService.CreateTargetSite method. +type GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest struct { + // Parent: Required. Parent resource name of TargetSite, such as + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine`. + Parent string `json:"parent,omitempty"` - // InputUris: Required. Cloud Storage URIs to input files. URI can be up - // to 2000 characters long. URIs can match the full object path (for - // example, `gs://bucket/directory/object.json`) or a pattern matching - // one or more files, such as `gs://bucket/directory/*.json`. A request - // can contain at most 100 files (or 100,000 files if `data_schema` is - // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` - // is `content`). - InputUris []string `json:"inputUris,omitempty"` + // TargetSite: Required. The TargetSite to create. + TargetSite *GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSite,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to + // ForceSendFields is a list of field names (e.g. "Parent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5971,8 +5656,8 @@ type GoogleCloudDiscoveryengineV1alphaGcsSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSchema") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -5980,20 +5665,29 @@ type GoogleCloudDiscoveryengineV1alphaGcsSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaGcsSource +func (s *GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateTargetSiteRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaGroundingConfig: Grounding -// configuration. -type GoogleCloudDiscoveryengineV1alphaGroundingConfig struct { - // Name: Required. Name of the GroundingConfig, of the form - // `projects/{project}/locations/{location}/groundingConfig`. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCustomAttribute: A custom attribute +// that is not explicitly modeled in a resource, e.g. UserEvent. +type GoogleCloudDiscoveryengineV1alphaCustomAttribute struct { + // Numbers: The numerical values of this custom attribute. For example, + // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of + // CustomAttribute.text or CustomAttribute.numbers should be set. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Numbers []float64 `json:"numbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to + // Text: The textual values of this custom attribute. For example, + // `["yellow", "green"]` when the key is "color". Empty string is not + // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly + // one of CustomAttribute.text or CustomAttribute.numbers should be set. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Text []string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Numbers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6001,8 +5695,8 @@ type GoogleCloudDiscoveryengineV1alphaGroundingConfig struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Numbers") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6010,67 +5704,37 @@ type GoogleCloudDiscoveryengineV1alphaGroundingConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaGroundingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaGroundingConfig +func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomAttribute raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec: Defines guided -// search spec. -type GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec struct { - // EnableRefinementAttributes: Whether or not to enable and include - // refinement attributes in gudied search result. - EnableRefinementAttributes bool `json:"enableRefinementAttributes,omitempty"` - - // EnableRelatedQuestions: Whether or not to enable and include related - // questions in search response. - EnableRelatedQuestions bool `json:"enableRelatedQuestions,omitempty"` - - // MaxRelatedQuestions: Max number of related questions to be returned. - // The valid range is [1, 5]. If enable_related_questions is true, the - // default value is 3. - MaxRelatedQuestions int64 `json:"maxRelatedQuestions,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnableRefinementAttributes") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "EnableRefinementAttributes") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GoogleCloudDiscoveryengineV1alphaCustomAttribute) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomAttribute + var s1 struct { + Numbers []gensupport.JSONFloat64 `json:"numbers"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Numbers = make([]float64, len(s1.Numbers)) + for i := range s1.Numbers { + s.Numbers[i] = float64(s1.Numbers[i]) + } + return nil } -// GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. -type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { - // ExternalIdpConfig: External Identity provider config. - ExternalIdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig `json:"externalIdpConfig,omitempty"` - - // IdpType: Identity provider type configured. - // - // Possible values: - // "IDP_TYPE_UNSPECIFIED" - Default value. ACL search not enabled. - // "GSUITE" - Google 1P provider. - // "THIRD_PARTY" - Third party provider. - IdpType string `json:"idpType,omitempty"` +// GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec: Defines custom +// fine tuning spec. +type GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec struct { + // EnableSearchAdaptor: Whether or not to enable and include custom fine + // tuned search adaptor model. + EnableSearchAdaptor bool `json:"enableSearchAdaptor,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalIdpConfig") + // ForceSendFields is a list of field names (e.g. "EnableSearchAdaptor") // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6078,7 +5742,7 @@ type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalIdpConfig") to + // NullFields is a list of field names (e.g. "EnableSearchAdaptor") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -6088,48 +5752,135 @@ type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaIdpConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfig +func (s *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig: Third -// party IDP Config. -type GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig struct { - // WorkforcePoolName: Workforce pool name. Example: - // "locations/global/workforcePools/pool_id" - WorkforcePoolName string `json:"workforcePoolName,omitempty"` +// 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 + // DocumentService.GetDocument or DocumentService.ListDocuments. + // Currently ACL is only supported in `GENERIC` industry vertical with + // non-`PUBLIC_WEBSITE` content config. + AclEnabled bool `json:"aclEnabled,omitempty"` - // ForceSendFields is a list of field names (e.g. "WorkforcePoolName") - // to unconditionally include in API requests. By default, fields with + // ContentConfig: Immutable. The content config of the data store. If + // this field is unset, the server behavior defaults to + // ContentConfig.NO_CONTENT. + // + // Possible values: + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "NO_CONTENT" - Only contains documents without any + // Document.content. + // "CONTENT_REQUIRED" - Only contains documents with Document.content. + // "PUBLIC_WEBSITE" - The data store is used for public website + // search. + ContentConfig string `json:"contentConfig,omitempty"` + + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + + // DefaultSchemaId: Output only. The id of the default Schema + // asscociated to this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + + // DisplayName: Required. The data store display name. This field must + // be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + + // IdpConfig: Output only. Data store level identity provider config. + IdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfig `json:"idpConfig,omitempty"` + + // IndustryVertical: Immutable. The industry vertical that the data + // store registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * + // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. + // Other solutions cannot be enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionTypes []string `json:"solutionTypes,omitempty"` + + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1alphaSchema `json:"startingSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AclEnabled") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WorkforcePoolName") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AclEnabled") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig +func (s *GoogleCloudDiscoveryengineV1alphaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDataStore raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata: -// Metadata related to the progress of the ImportCompletionSuggestions +// GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.DeleteDataStore // operation. This will be returned by the // google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata struct { +type GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -6154,30 +5905,25 @@ type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse: -// Response of the CompletionService.ImportCompletionSuggestions method. -// If the long running operation is done, this message is returned by -// the google.longrunning.Operations.response field if the operation is -// successful. -type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // FailureCount: Count of CompletionSuggestions that failed to be - // imported. - FailureCount int64 `json:"failureCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata: Metadata +// related to the progress of the EngineService.DeleteEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // SuccessCount: Count of CompletionSuggestions successfully imported. - SuccessCount int64 `json:"successCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6185,35 +5931,27 @@ type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse +func (s *GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { +// GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -6235,90 +5973,25 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request -// message for Import methods. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { - // AutoGenerateIds: Whether to automatically generate IDs for the - // documents if absent. If set to `true`, Document.ids are automatically - // generated based on the hash of the payload, where IDs may not be - // consistent during multiple imports. In which case - // ReconciliationMode.FULL is highly recommended to avoid duplicate - // contents. If unset or set to `false`, Document.ids have to be - // specified using id_field, otherwise, documents without IDs fail to be - // imported. Supported data sources: * GcsSource. GcsSource.data_schema - // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is - // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` - // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * - // SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource - AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - - // BigtableSource: Cloud Bigtable input source. - BigtableSource *GoogleCloudDiscoveryengineV1alphaBigtableSource `json:"bigtableSource,omitempty"` - - // CloudSqlSource: Cloud SQL input source. - CloudSqlSource *GoogleCloudDiscoveryengineV1alphaCloudSqlSource `json:"cloudSqlSource,omitempty"` - - // ErrorConfig: The desired location of errors incurred during the - // Import. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - - // FhirStoreSource: FhirStore input source. - FhirStoreSource *GoogleCloudDiscoveryengineV1alphaFhirStoreSource `json:"fhirStoreSource,omitempty"` - - // FirestoreSource: Firestore input source. - FirestoreSource *GoogleCloudDiscoveryengineV1alphaFirestoreSource `json:"firestoreSource,omitempty"` - - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - - // IdField: The field indicates the ID field or column to be used as - // unique IDs of the documents. For GcsSource it is the key of the JSON - // field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For - // others, it may be the column name of the table where the unique ids - // are stored. The values of the JSON field or the table column are used - // as the Document.ids. The JSON field or the table column must be of - // string type, and the values must be set as valid strings conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) with 1-63 characters. - // Otherwise, documents without valid IDs fail to be imported. Only set - // this field when auto_generate_ids is unset or set as `false`. - // Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a - // default value `_id` is used when importing from the allowed data - // sources. Supported data sources: * GcsSource. GcsSource.data_schema - // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is - // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` - // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * - // SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource - IdField string `json:"idField,omitempty"` - - // InlineSource: The Inline source for the input content for documents. - InlineSource *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` - - // ReconciliationMode: The mode of reconciliation between existing - // documents and the documents to be imported. Defaults to - // ReconciliationMode.INCREMENTAL. - // - // Possible values: - // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. - // "INCREMENTAL" - Inserts new documents or updates existing - // documents. - // "FULL" - Calculates diff and replaces the entire document dataset. - // Existing documents may be deleted if they are not present in the - // source location. - ReconciliationMode string `json:"reconciliationMode,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.DeleteTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // SpannerSource: Spanner input source. - SpannerSource *GoogleCloudDiscoveryengineV1alphaSpannerSource `json:"spannerSource,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. "AutoGenerateIds") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6326,30 +5999,34 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoGenerateIds") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource: -// The inline source for the input config for ImportDocuments method. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct { - // Documents: Required. A list of documents to update/create. Each - // document must have a valid Document.id. Recommended max of 100 items. - Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Documents") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6357,7 +6034,7 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6366,27 +6043,81 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest: +// Request message for SiteSearchEngineService.DisableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest struct { +} - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse: +// Response message for +// SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse struct { +} - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to +// GoogleCloudDiscoveryengineV1alphaDocument: Document captures all raw +// metadata information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1alphaDocument struct { + // AclInfo: Access control information for the document. + AclInfo *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo `json:"aclInfo,omitempty"` + + // Content: The unstructured data linked to this document. Content must + // be set if this document is under a `CONTENT_REQUIRED` data store. + Content *GoogleCloudDiscoveryengineV1alphaDocumentContent `json:"content,omitempty"` + + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It + // contains derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + + // Id: Immutable. The identifier of the document. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + Id string `json:"id,omitempty"` + + // IndexTime: Output only. The last time the document was indexed. If + // this field is set, the document could be returned in search results. + // This field is OUTPUT_ONLY. If this field is not populated, it means + // the document has never been indexed. + IndexTime string `json:"indexTime,omitempty"` + + // JsonData: The JSON string representation of the document. It should + // conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + JsonData string `json:"jsonData,omitempty"` + + // Name: Immutable. The full resource name of the document. Format: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/branches/{branch}/documents/{document_id}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + + // ParentDocumentId: The identifier of the parent document. Currently + // supports at most two level document hierarchy. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + ParentDocumentId string `json:"parentDocumentId,omitempty"` + + // SchemaId: The identifier of the schema located in the same data + // store. + SchemaId string `json:"schemaId,omitempty"` + + // StructData: The structured JSON data for the document. It should + // conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AclInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6394,31 +6125,28 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AclInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocument raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentAclInfo: ACL Information of +// the Document. +type GoogleCloudDiscoveryengineV1alphaDocumentAclInfo struct { + // Readers: Readers of the document. + Readers []*GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction `json:"readers,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // ForceSendFields is a list of field names (e.g. "Readers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6426,7 +6154,7 @@ type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // NullFields is a list of field names (e.g. "Readers") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6435,25 +6163,29 @@ type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaDocumentAclInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetada -// ta: Metadata related to the progress of the -// ImportSuggestionDenyListEntries operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata 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"` +// GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction: +// AclRestriction to model complex inheritance restrictions. Example: +// Modeling a "Both Permit" inheritance, where to access a child +// document, user needs to have access to parent document. Document +// Hierarchy - Space_S --> Page_P. Readers: Space_S: group_1, user_1 +// Page_P: group_2, group_3, user_2 Space_S ACL Restriction - { +// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_1" +// }, { "user_id": "user_1" } ] } ] } } Page_P ACL Restriction. { +// "acl_info": { "readers": [ { "principals": [ { "group_id": "group_2" +// }, { "group_id": "group_3" }, { "user_id": "user_2" } ], }, { +// "principals": [ { "group_id": "group_1" }, { "user_id": "user_1" } ], +// } ] } } +type GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction struct { + // Principals: List of principals. + Principals []*GoogleCloudDiscoveryengineV1alphaPrincipal `json:"principals,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Principals") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6461,7 +6193,7 @@ type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Principals") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6470,28 +6202,40 @@ type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata st NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentAclInfoAccessRestriction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesReques -// t: Request message for -// CompletionService.ImportSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest struct { - // GcsSource: Cloud Storage location for the input content. Only 1 file - // can be specified that contains all entries to import. Supported - // values `gcs_source.schema` for autocomplete suggestion deny list - // entry imports: * `suggestion_deny_list` (default): One JSON - // [SuggestionDenyListEntry] per line. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentContent: Unstructured data +// linked to this document. +type GoogleCloudDiscoveryengineV1alphaDocumentContent struct { + // MimeType: The MIME type of the content. Supported types: * + // `application/pdf` (PDF, only native PDFs are supported for now) * + // `text/html` (HTML) * + // `application/vnd.openxmlformats-officedocument.wordprocessingml.docume + // nt` (DOCX) * + // `application/vnd.openxmlformats-officedocument.presentationml.presenta + // tion` (PPTX) * `text/plain` (TXT) See + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` - // InlineSource: The Inline source for the input content for suggestion - // deny list entries. - InlineSource *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` + // RawBytes: The content represented as a stream of bytes. The maximum + // length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all + // `bytes` fields, this field is represented as pure binary in Protocol + // Buffers and base64-encoded string in JSON. For example, + // `abc123!?$*&()'-=@~` should be represented as + // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + RawBytes string `json:"rawBytes,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to + // Uri: The URI of the content. Only Cloud Storage URIs (e.g. + // `gs://bucket-name/path/to/file`) are supported. The maximum file size + // is 2.5 MB for text-based formats, 100 MB for other formats. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MimeType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6499,7 +6243,7 @@ type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in + // NullFields is a list of field names (e.g. "MimeType") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6508,100 +6252,38 @@ type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest +func (s *GoogleCloudDiscoveryengineV1alphaDocumentContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentContent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesReques -// tInlineSource: The inline source for SuggestionDenyListEntry. -type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource struct { - // Entries: Required. A list of all denylist entries to import. Max of - // 1000 items. - Entries []*GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry `json:"entries,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Entries") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Entries") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRespon -// se: Response message for -// CompletionService.ImportSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // FailedEntriesCount: Count of deny list entries that failed to be - // imported. - FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` - - // ImportedEntriesCount: Count of deny list entries successfully - // imported. - ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` - - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ErrorSamples") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// GoogleCloudDiscoveryengineV1alphaDocumentInfo: Detailed document +// information associated with a user event. +type GoogleCloudDiscoveryengineV1alphaDocumentInfo struct { + // Id: The Document resource ID. + Id string `json:"id,omitempty"` -// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` + // Name: The Document resource full name, of the form: + // `projects/{project_id}/locations/{location}/collections/{collection_id + // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ + // id}` + Name string `json:"name,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` + // PromotionIds: The promotion IDs associated with this Document. + // Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // Quantity: Quantity of the Document associated with the user event. + // Defaults to 1. For example, this field will be 2 if two quantities of + // the same Document are involved in a `add-to-cart` event. Required for + // events of the following event types: * `add-to-cart` * `purchase` + Quantity int64 `json:"quantity,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Uri: The Document URI - only allowed for website data stores. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6609,8 +6291,8 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6618,29 +6300,47 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request -// message for the ImportUserEvents request. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig: A +// singleton resource of DataStore. It's empty when DataStore is +// created, which defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig struct { + // ChunkingConfig: Whether chunking mode is enabled. + ChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig `json:"chunkingConfig,omitempty"` - // ErrorConfig: The desired location of errors incurred during the - // Import. Cannot be set for inline user event imports. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` - // InlineSource: The Inline source for the input content for UserEvents. - InlineSource *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigquerySource") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ChunkingConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6648,7 +6348,7 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigquerySource") to + // NullFields is a list of field names (e.g. "ChunkingConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -6658,65 +6358,58 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource: -// The inline source for the input config for ImportUserEvents method. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct { - // UserEvents: Required. A list of user events to import. Recommended - // max of 10k items. - UserEvents []*GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvents,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// g: Configuration for chunking config. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig struct { + // LayoutBasedChunkingConfig: Configuration for the layout based + // chunking. + LayoutBasedChunkingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig `json:"layoutBasedChunkingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserEvents") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserEvents") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "LayoutBasedChunkingConfig") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. However, any field with an empty value appearing in + // NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response -// of the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfi +// gLayoutBasedChunkingConfig: Configuration for the layout based +// chunking. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig struct { + // ChunkSize: The token size limit for each chunk. Supported values: + // 100-500 (inclusive). Default value: 500. + ChunkSize int64 `json:"chunkSize,omitempty"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + // IncludeAncestorHeadings: Whether to include appending different + // levels of headings to chunks from the middle of the document to + // prevent context loss. Default value: False. + IncludeAncestorHeadings bool `json:"includeAncestorHeadings,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "ChunkSize") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6724,44 +6417,45 @@ type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ChunkSize") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. -type GoogleCloudDiscoveryengineV1alphaInterval struct { - // ExclusiveMaximum: Exclusive upper bound. - ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - - // ExclusiveMinimum: Exclusive lower bound. - ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig +// : Related configurations applied to a specific type of document +// parser. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - // Maximum: Inclusive upper bound. - Maximum float64 `json:"maximum,omitempty"` + // LayoutParsingConfig: Configurations applied to layout parser. + LayoutParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig `json:"layoutParsingConfig,omitempty"` - // Minimum: Inclusive lower bound. - Minimum float64 `json:"minimum,omitempty"` + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExclusiveMaximum") to + // NullFields is a list of field names (e.g. "DigitalParsingConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -6771,123 +6465,66 @@ type GoogleCloudDiscoveryengineV1alphaInterval struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaInterval +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaInterval - var s1 struct { - ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` - ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` - Maximum gensupport.JSONFloat64 `json:"maximum"` - Minimum gensupport.JSONFloat64 `json:"minimum"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) - s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) - s.Maximum = float64(s1.Maximum) - s.Minimum = float64(s1.Minimum) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaListChunksResponse: Response message -// for ChunkService.ListChunks method. -type GoogleCloudDiscoveryengineV1alphaListChunksResponse struct { - // Chunks: The Chunks. - Chunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"chunks,omitempty"` - - // NextPageToken: A token that can be sent as - // ListChunksRequest.page_token to retrieve the next page. If this field - // is omitted, there are no subsequent pages. - 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. "Chunks") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Chunks") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig +// DigitalParsingConfig: The digital parsing configurations for +// documents. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { } -func (s *GoogleCloudDiscoveryengineV1alphaListChunksResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListChunksResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig +// LayoutParsingConfig: The layout parsing configurations for documents. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig struct { } -// GoogleCloudDiscoveryengineV1alphaListConversationsResponse: Response -// for ListConversations method. -type GoogleCloudDiscoveryengineV1alphaListConversationsResponse struct { - // Conversations: All the Conversations for a given data store. - Conversations []*GoogleCloudDiscoveryengineV1alphaConversation `json:"conversations,omitempty"` - - // NextPageToken: Pagination token, if not returned indicates the last - // page. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig +// OcrParsingConfig: The OCR parsing configurations for documents. +type GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conversations") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListConversationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListConversationsResponse +func (s *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListDataStoresResponse: Response -// message for DataStoreService.ListDataStores method. -type GoogleCloudDiscoveryengineV1alphaListDataStoresResponse struct { - // DataStores: All the customer's DataStores. - DataStores []*GoogleCloudDiscoveryengineV1alphaDataStore `json:"dataStores,omitempty"` - - // NextPageToken: A token that can be sent as - // ListDataStoresRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1alphaDoubleList: Double list. +type GoogleCloudDiscoveryengineV1alphaDoubleList struct { + // Values: Double values. + Values []float64 `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStores") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6895,8 +6532,8 @@ type GoogleCloudDiscoveryengineV1alphaListDataStoresResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStores") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6904,28 +6541,36 @@ type GoogleCloudDiscoveryengineV1alphaListDataStoresResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListDataStoresResponse +func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDoubleList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListDocumentsResponse: Response -// message for DocumentService.ListDocuments method. -type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { - // Documents: The Documents. - Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` - - // NextPageToken: A token that can be sent as - // ListDocumentsRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaDoubleList) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaDoubleList + var s1 struct { + Values []gensupport.JSONFloat64 `json:"values"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Values = make([]float64, len(s1.Values)) + for i := range s1.Values { + s.Values[i] = float64(s1.Values[i]) + } + return nil +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1alphaEmbeddingConfig: Defines embedding +// config, used for bring your own embeddings feature. +type GoogleCloudDiscoveryengineV1alphaEmbeddingConfig struct { + // FieldPath: Full field path in the schema mapped as embedding field. + FieldPath string `json:"fieldPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "Documents") to + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6933,7 +6578,7 @@ type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") to include in + // NullFields is a list of field names (e.g. "FieldPath") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6942,26 +6587,25 @@ type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEmbeddingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListEnginesResponse: Response -// message for EngineService.ListEngines method. -type GoogleCloudDiscoveryengineV1alphaListEnginesResponse struct { - // Engines: All the customer's Engines. - Engines []*GoogleCloudDiscoveryengineV1alphaEngine `json:"engines,omitempty"` - - // NextPageToken: Not supported. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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. "Engines") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6969,7 +6613,7 @@ type GoogleCloudDiscoveryengineV1alphaListEnginesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engines") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6978,28 +6622,119 @@ type GoogleCloudDiscoveryengineV1alphaListEnginesResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListEnginesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListEnginesResponse +func (s *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListSchemasResponse: Response -// message for SchemaService.ListSchemas method. -type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { - // NextPageToken: A token that can be sent as - // ListSchemasRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // Schemas: The Schemas. - Schemas []*GoogleCloudDiscoveryengineV1alphaSchema `json:"schemas,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest: +// Request message for SiteSearchEngineService.EnableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest struct { +} - // ServerResponse contains the HTTP response code and headers from the +// GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse: +// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1alphaEngine: Metadata that describes the +// training and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1alphaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable + // if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + + // ChatEngineMetadata: Output only. Additional information of the Chat + // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + + // CommonConfig: Common config spec that specifies the metadata of the + // engine. + CommonConfig *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig `json:"commonConfig,omitempty"` + + // CreateTime: Output only. Timestamp the Recommendation Engine was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of + // engines, they can only associate with at most one data store. If + // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same + // Collection can be associated here. Note that when used in + // CreateEngineRequest, one DataStore id must be provided as the system + // will use it for necessary initializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + + // DisplayName: Required. The display name of the engine. Should be + // human readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + + // IndustryVertical: The industry vertical that the engine registers. + // The restriction of the Engine industry vertical is based on + // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine + // has to match vertical of the DataStore liniked to the engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // MediaRecommendationEngineConfig: Configurations for the Media Engine. + // Only applicable on the data stores with solution_type + // SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical. + MediaRecommendationEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig `json:"mediaRecommendationEngineConfig,omitempty"` + + // Name: Immutable. The fully qualified resource name of the engine. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n}/engines/{engine}` engine should be 1-63 characters, and valid + // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is + // returned. + Name string `json:"name,omitempty"` + + // RecommendationMetadata: Output only. Additional information of a + // recommendation engine. Only applicable if solution_type is + // SOLUTION_TYPE_RECOMMENDATION. + RecommendationMetadata *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata `json:"recommendationMetadata,omitempty"` + + // SearchEngineConfig: Configurations for the Search Engine. Only + // applicable if solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + + // SimilarDocumentsConfig: Additional config specs for a `similar-items` + // engine. + SimilarDocumentsConfig *GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig `json:"similarDocumentsConfig,omitempty"` + + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7007,78 +6742,98 @@ type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ChatEngineConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListSchemasResponse +func (s *GoogleCloudDiscoveryengineV1alphaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngine raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse: Response -// for ListServingConfigs method. -type GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse struct { - // NextPageToken: Pagination token, if not returned indicates the last - // page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServingConfigs: All the ServingConfigs for a given dataStore. - ServingConfigs []*GoogleCloudDiscoveryengineV1alphaServingConfig `json:"servingConfigs,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig: +// Configurations for a Chat Engine. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent + // that is associated to this Engine. Note that these configurations are + // one-time consumed by and passed to Dialogflow service. It means they + // cannot be retrieved using EngineService.GetEngine or + // EngineService.ListEngines API after engine creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent + // to link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that + // links the agent with the Chat engine. Format: + // `projects//locations//agents/`. Note that the + // `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using + // EngineService.GetEngine or EngineService.ListEngines API after engine + // creation. Please use ChatEngineMetadata.dialogflow_agent for actual + // agent association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AgentCreationConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse: Response -// message for SiteSearchEngineService.ListTargetSites method. -type GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationCo +// nfig: Configurations for generating a Dialogflow agent. Note that +// these configurations are one-time consumed by and passed to +// Dialogflow service. It means they cannot be retrieved using +// EngineService.GetEngine or EngineService.ListEngines API after engine +// creation. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` - // TargetSites: List of TargetSites. - TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a + // list of the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` - // TotalSize: The total number of items matching the request. This will - // always be populated in the response. - TotalSize int64 `json:"totalSize,omitempty"` + // Location: Agent location for Agent creation, supported values: + // global/us/eu. If not provided, us Engine will create Agent using + // us-central-1 by default; eu Engine will create Agent using eu-west-1 + // by default. + Location string `json:"location,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // TimeZone: Required. The time zone of the agent from the time zone + // database (https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Business") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7086,28 +6841,29 @@ type GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Business") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest: Request -// message for WidgetService.LookupWidgetConfig method. -type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { - // WidgetConfigId: Required. The UUID of the Widget Config. - WidgetConfigId string `json:"widgetConfigId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this + // Chat Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "WidgetConfigId") to + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7115,7 +6871,7 @@ type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WidgetConfigId") to + // NullFields is a list of field names (e.g. "DialogflowAgent") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7125,66 +6881,86 @@ type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest +func (s *GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse: Response -// message for WidgetService.LookupWidgetConfig method. -type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse struct { - // AnonymousWidgetConfig: The Anonymous Widget Config associated with - // the UUID. - AnonymousWidgetConfig *GoogleCloudDiscoveryengineV1alphaWidgetConfig `json:"anonymousWidgetConfig,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// 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 string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "AnonymousWidgetConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "CompanyName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnonymousWidgetConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CompanyName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse +func (s *GoogleCloudDiscoveryengineV1alphaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineCommonConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event -// information. -type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { - // MediaProgressDuration: The media progress time in seconds, if - // applicable. For example, if the end user has finished 90 seconds of a - // playback video, then MediaInfo.media_progress_duration.seconds should - // be set to 90. - MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// : Additional config specs for a Media Recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig struct { + // OptimizationObjective: The optimization objective. e.g., `cvr`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `ctr`, `cvr`. If not specified, we choose default based on + // engine type. Default depends on type of recommendation: + // `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` + OptimizationObjective string `json:"optimizationObjective,omitempty"` - // MediaProgressPercentage: Media progress should be computed using only - // the media_progress_duration relative to the media total length. This - // value must be between `[0, 1.0]` inclusive. If this is not a playback - // or the progress cannot be computed (e.g. ongoing livestream), this - // field should be unset. - MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` + // OptimizationObjectiveConfig: Name and value of the custom threshold + // for cvr optimization_objective. For target_field `watch-time`, + // target_field_value must be an integer value indicating the media + // progress time in seconds between (0, 86400] (excludes 0, includes + // 86400) (e.g., 90). For target_field `watch-percentage`, the + // target_field_value must be a valid float value between (0, 1.0] + // (excludes 0, includes 1.0) (e.g., 0.5). + OptimizationObjectiveConfig *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig `json:"optimizationObjectiveConfig,omitempty"` + + // TrainingState: The training state that the engine is in (e.g. + // `TRAINING` or `PAUSED`). Since part of the cost of running the + // service is frequency of training - this can be used to determine when + // to train engine in order to control cost. If not specified: the + // default value for `CreateEngine` method is `TRAINING`. The default + // value for `UpdateEngine` method is to keep the state the same as + // before. + // + // Possible values: + // "TRAINING_STATE_UNSPECIFIED" - Unspecified training state. + // "PAUSED" - The engine training is paused. + // "TRAINING" - The engine is training. + TrainingState string `json:"trainingState,omitempty"` + + // Type: Required. The type of engine. e.g., `recommended-for-you`. This + // field together with optimization_objective describe engine metadata + // to use to control engine training and serving. Currently supported + // values: `recommended-for-you`, `others-you-may-like`, + // `more-like-this`, `most-popular-items`. + Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. - // "MediaProgressDuration") to unconditionally include in API requests. + // "OptimizationObjective") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -7192,7 +6968,7 @@ type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MediaProgressDuration") to + // NullFields is a list of field names (e.g. "OptimizationObjective") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7202,62 +6978,25 @@ type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo - var s1 struct { - MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. -type GoogleCloudDiscoveryengineV1alphaPageInfo struct { - // PageCategory: The most specific category associated with a category - // page. To represent full path of category, use '>' sign to separate - // different hierarchies. If '>' is part of the category name, please - // replace it with other character(s). Category pages include special - // pages such as sales or promotions. For instance, a special sale page - // may have the category hierarchy: "pageCategory" : "Sales > 2017 - // Black Friday Deals". Required for `view-category-page` events. Other - // event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - PageCategory string `json:"pageCategory,omitempty"` - - // PageviewId: A unique ID of a web page view. This should be kept the - // same for all user events triggered from the same pageview. For - // example, an item detail page view could trigger multiple events as - // the user is browsing the page. The `pageview_id` property should be - // kept the same for all these events so that they can be grouped - // together properly. When using the client side event reporting with - // JavaScript pixel and Google Tag Manager, this value is filled in - // automatically. - PageviewId string `json:"pageviewId,omitempty"` - - // ReferrerUri: The referrer URL of the current page. When using the - // client side event reporting with JavaScript pixel and Google Tag - // Manager, this value is filled in automatically. However, some browser - // privacy restrictions may cause this field to be empty. - ReferrerUri string `json:"referrerUri,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig +// OptimizationObjectiveConfig: Custom threshold for `cvr` +// optimization_objective. +type GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig struct { + // TargetField: Required. The name of the field to target. Currently + // supported values: `watch-percentage`, `watch-time`. + TargetField string `json:"targetField,omitempty"` - // Uri: Complete URL (window.location.href) of the user's current page. - // When using the client side event reporting with JavaScript pixel and - // Google Tag Manager, this value is filled in automatically. Maximum - // length 5,000 characters. - Uri string `json:"uri,omitempty"` + // TargetFieldValueFloat: Required. The threshold to be applied to the + // target (e.g., 0.5). + TargetFieldValueFloat float64 `json:"targetFieldValueFloat,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageCategory") to + // ForceSendFields is a list of field names (e.g. "TargetField") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7265,7 +7004,7 @@ type GoogleCloudDiscoveryengineV1alphaPageInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageCategory") to include + // NullFields is a list of field names (e.g. "TargetField") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -7274,30 +7013,69 @@ type GoogleCloudDiscoveryengineV1alphaPageInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPageInfo +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPanelInfo: Detailed panel -// information associated with a user event. -type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { - // DisplayName: The display name of the panel. - DisplayName string `json:"displayName,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig + var s1 struct { + TargetFieldValueFloat gensupport.JSONFloat64 `json:"targetFieldValueFloat"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.TargetFieldValueFloat = float64(s1.TargetFieldValueFloat) + return nil +} - // PanelId: Required. The panel ID. - PanelId string `json:"panelId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata: +// Additional information of a recommendation engine. +type GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata struct { + // DataState: Output only. The state of data requirements for this + // engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the + // data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state + // even if serving state is `ACTIVE`: engines were trained successfully + // before, but cannot be refreshed because the underlying engine no + // longer has sufficient data for training. + // + // Possible values: + // "DATA_STATE_UNSPECIFIED" - Unspecified default value, should never + // be explicitly set. + // "DATA_OK" - The engine has sufficient training data. + // "DATA_ERROR" - The engine does not have sufficient training data. + // Error messages can be queried via Stackdriver. + DataState string `json:"dataState,omitempty"` - // PanelPosition: The ordered position of the panel, if shown to the - // user with other panels. If set, then total_panels must also be set. - PanelPosition int64 `json:"panelPosition,omitempty"` + // LastTuneTime: Output only. The timestamp when the latest successful + // tune finished. Only applicable on Media Recommendation engines. + LastTuneTime string `json:"lastTuneTime,omitempty"` - // TotalPanels: The total number of panels, including this one, shown to - // the user. Must be set if panel_position is set. - TotalPanels int64 `json:"totalPanels,omitempty"` + // ServingState: Output only. The serving state of the engine: `ACTIVE`, + // `NOT_ACTIVE`. + // + // Possible values: + // "SERVING_STATE_UNSPECIFIED" - Unspecified serving state. + // "INACTIVE" - The engine is not serving. + // "ACTIVE" - The engine is serving and can be queried. + // "TUNED" - The engine is trained on tuned hyperparameters and can be + // queried. + ServingState string `json:"servingState,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // TuningOperation: Output only. The latest tune operation id associated + // with the engine. Only applicable on Media Recommendation engines. If + // present, this operation id can be used to determine if there is an + // ongoing tune for this engine. To check the operation status, send the + // GetOperation request with this operation id in the engine resource + // format. If no tuning has happened for this engine, the string is + // empty. + TuningOperation string `json:"tuningOperation,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataState") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7305,42 +7083,45 @@ type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DataState") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPanelInfo +func (s *GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPauseEngineRequest: Request for -// pausing training of an engine. -type GoogleCloudDiscoveryengineV1alphaPauseEngineRequest struct { -} +// GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig: +// Configurations for a Search Engine. +type GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` -// GoogleCloudDiscoveryengineV1alphaPrincipal: Principal identifier of a -// user or a group. -type GoogleCloudDiscoveryengineV1alphaPrincipal struct { - // GroupId: Group identifier. For Google Workspace user account, - // group_id should be the google workspace group email. For non-google - // identity provider user account, group_id is the mapped group - // identifier configured during the workforcepool config. - GroupId string `json:"groupId,omitempty"` - - // UserId: User identifier. For Google Workspace user account, user_id - // should be the google workspace user email. For non-google identity - // provider user account, user_id is the mapped user identifier - // configured during the workforcepool config. - UserId string `json:"userId,omitempty"` + // SearchTier: The search feature tier of this engine. Different tiers + // might have different pricing. To learn more, please check the pricing + // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not + // specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "GroupId") to + // ForceSendFields is a list of field names (e.g. "SearchAddOns") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7348,82 +7129,33 @@ type GoogleCloudDiscoveryengineV1alphaPrincipal struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GroupId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "SearchAddOns") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPrincipal) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPrincipal +func (s *GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaProcessedDocument: Document captures -// all raw metadata information of items to be recommended or searched. -type GoogleCloudDiscoveryengineV1alphaProcessedDocument struct { - // Document: Required. Full resource name of the referenced document, in - // the format - // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document - // s/*`. - Document string `json:"document,omitempty"` - - // JsonData: The JSON string representation of the processed document. - JsonData string `json:"jsonData,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Document") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Document") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaProcessedDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaProcessedDocument - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig: +// Additional config specs for a `similar-items` engine. +type GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig struct { } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata: Metadata -// related to the progress of the PurgeDocuments operation. This will be +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata: Metadata +// related to the progress of the EstimateDataSize operation. This is // returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata 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. However, any @@ -7441,32 +7173,22 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest: Request -// message for DocumentService.PurgeDocuments method. -type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { - // ErrorConfig: The desired location of errors incurred during the - // purge. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig `json:"errorConfig,omitempty"` - - // 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"` +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest: Request +// message for EstimateBillingService.EstimateDataSize method +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest struct { + // FileDataSource: Structured or unstructured data. + FileDataSource *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource `json:"fileDataSource,omitempty"` - // GcsSource: Cloud Storage location for the input content. Supported - // `data_schema`: * `document_id`: One valid Document.id per line. - GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + // WebsiteDataSource: Website data. + WebsiteDataSource *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource `json:"websiteDataSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "FileDataSource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7474,36 +7196,32 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FileDataSource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse: 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 GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { - // PurgeCount: The total count of documents purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource +// : Data source contains files either in Cloud Storage or BigQuery. +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - // 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"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ForceSendFields is a list of field names (e.g. "BigquerySource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7511,66 +7229,73 @@ type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BigquerySource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestFileDataSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig: Configuration of -// destination for Purge related errors. -type GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for purge errors. This must be an - // empty, existing Cloud Storage directory. Purge errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSou +// rce: Data source is a set of website patterns that we crawl to get +// the total number of websites. +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource struct { + // EstimatorUriPatterns: Required. The URI patterns to estimate the data + // sizes. At most 10 patterns are allowed, otherwise an INVALID_ARGUMENT + // error is thrown. + EstimatorUriPatterns []*GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern `json:"estimatorUriPatterns,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "EstimatorUriPatterns") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EstimatorUriPatterns") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadat -// a: Metadata related to the progress of the -// PurgeSuggestionDenyListEntries operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSou +// rceEstimatorUriPattern: URI patterns that we use to crawl. +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern struct { + // ExactMatch: Whether we infer the generated URI or use the exact + // provided one. + ExactMatch bool `json:"exactMatch,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Exclusive: Whether the pattern is exclusive or not. If set to true, + // the pattern is considered exclusive. If unset or set to false, the + // pattern is considered inclusive by default. + Exclusive bool `json:"exclusive,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ProvidedUriPattern: User provided URI pattern. For example, + // `foo.com/bar/*`. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7578,7 +7303,7 @@ type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ExactMatch") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7587,30 +7312,25 @@ type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequestWebsiteDataSourceEstimatorUriPattern raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest -// : Request message for -// CompletionService.PurgeSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest struct { -} - -// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRespons -// e: Response message for -// CompletionService.PurgeSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +// GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse: Response +// of the EstimateDataSize request. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse struct { + // DataSizeBytes: Data size in terms of bytes. + DataSizeBytes int64 `json:"dataSizeBytes,omitempty,string"` - // PurgeCount: Number of suggestion deny list entries purged. - PurgeCount int64 `json:"purgeCount,omitempty,string"` + // DocumentCount: Total number of documents. + DocumentCount int64 `json:"documentCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // ForceSendFields is a list of field names (e.g. "DataSizeBytes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7618,7 +7338,7 @@ type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include + // NullFields is a list of field names (e.g. "DataSizeBytes") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -7627,111 +7347,29 @@ type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata -// related to the progress of the PurgeUserEvents operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest: Request -// message for PurgeUserEvents method. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { - // Filter: Required. The filter string to specify the events to be - // deleted with a length limit of 5,000 characters. The eligible fields - // for filtering are: * `eventType`: Double quoted UserEvent.event_type - // string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: - // Double quoted string. Specifying this will delete all events - // associated with a visitor. * `userId`: Double quoted string. - // Specifying this will delete all events associated with a user. - // Examples: * Deleting all events in a time range: `eventTime > - // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * - // Deleting specific eventType: `eventType = "search" * Deleting all - // events for a specific visitor: `userPseudoId = "visitor1024" * - // Deleting all events inside a DataStore: `*` The filtering fields are - // assumed to have an implicit AND. - Filter string `json:"filter,omitempty"` - - // Force: The `force` field is currently not supported. Purge user event - // requests will permanently delete all purgeable events. Once the - // development is complete: If `force` is set to false, the method will - // return the expected purge count without deleting any user events. - // This field will default to false if not included in the request. - 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} +// GoogleCloudDiscoveryengineV1alphaFactChunk: Fact Chunk. +type GoogleCloudDiscoveryengineV1alphaFactChunk struct { + // ChunkText: Text content of the fact chunk. Can be at most 10K + // characters long. + ChunkText string `json:"chunkText,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Source: Source from which this fact chunk was retrieved. If it was + // retrieved from the GroundingFacts provided in the request then this + // field will contain the index of the specific fact from which this + // chunk was retrieved. + Source string `json:"source,omitempty"` -// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of -// the PurgeUserEventsRequest. If the long running operation is -// successfully done, then this message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { - // PurgeCount: The total count of events purged as a result of the - // operation. - PurgeCount int64 `json:"purgeCount,omitempty,string"` + // SourceMetadata: More fine-grained information for the source + // reference. + SourceMetadata map[string]string `json:"sourceMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ForceSendFields is a list of field names (e.g. "ChunkText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7739,7 +7377,7 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in + // NullFields is a list of field names (e.g. "ChunkText") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7748,72 +7386,34 @@ type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaFactChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFactChunk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRankRequest: Request message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1alphaRankRequest struct { - // IgnoreRecordDetailsInResponse: If true, the response will contain - // only record ID and score. By default, it is false, the response will - // contain record details. - IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` - - // Model: The identifier of the model to use. It is one of: * - // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn - // input token size 512. It is set to `semantic-ranker-512@latest` by - // default if unspecified. - Model string `json:"model,omitempty"` - - // Query: The query to use. - Query string `json:"query,omitempty"` - - // Records: Required. A list of records to rank. - Records []*GoogleCloudDiscoveryengineV1alphaRankingRecord `json:"records,omitempty"` - - // TopN: The number of results to return. If this is unset or no bigger - // than zero, returns all results. - TopN int64 `json:"topN,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IgnoreRecordDetailsInResponse") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "IgnoreRecordDetailsInResponse") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} +// GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse +// : Response message for +// SiteSearchEngineService.FetchDomainVerificationStatus method. +type GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaRankRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRankRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // TargetSites: List of TargetSites containing the site verification + // status. + TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` -// GoogleCloudDiscoveryengineV1alphaRankResponse: Response message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1alphaRankResponse struct { - // Records: A list of records sorted by descending score. - Records []*GoogleCloudDiscoveryengineV1alphaRankingRecord `json:"records,omitempty"` + // TotalSize: The total number of items matching the request. This will + // always be populated in the response. + TotalSize int64 `json:"totalSize,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Records") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7821,42 +7421,37 @@ type GoogleCloudDiscoveryengineV1alphaRankResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Records") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRankResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRankResponse +func (s *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRankingRecord: Record message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1alphaRankingRecord struct { - // Content: The content of the record. Empty by default. At least one of - // title or content should be set otherwise an INVALID_ARGUMENT error is - // thrown. - Content string `json:"content,omitempty"` - - // Id: The unique ID to represent the record. - Id string `json:"id,omitempty"` - - // Score: The score of this record based on the given query and selected - // model. - Score float64 `json:"score,omitempty"` +// GoogleCloudDiscoveryengineV1alphaFhirStoreSource: Cloud FhirStore +// source import data from. +type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { + // FhirStore: Required. The full resource name of the FHIR store to + // import data from, in the format of + // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores + // /{fhir_store}`. + FhirStore string `json:"fhirStore,omitempty"` - // Title: The title of the record. Empty by default. At least one of - // title or content should be set otherwise an INVALID_ARGUMENT error is - // thrown. - Title string `json:"title,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the FhirStore export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7864,7 +7459,7 @@ type GoogleCloudDiscoveryengineV1alphaRankingRecord struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "FhirStore") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7873,163 +7468,163 @@ type GoogleCloudDiscoveryengineV1alphaRankingRecord struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRankingRecord) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRankingRecord +func (s *GoogleCloudDiscoveryengineV1alphaFhirStoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFhirStoreSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaRankingRecord) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaRankingRecord - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message -// for Recommend method. -type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { - // Filter: Filter for restricting recommendation results with a length - // limit of 5,000 characters. Currently, only filter expressions on the - // `filter_tags` attribute is supported. Examples: * `(filter_tags: - // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * - // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: - // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the - // `params` field, then attribute-based expressions are expected instead - // of the above described tag-based syntax. Examples: * (launguage: - // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: - // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) - // If your filter blocks all results, the API will return generic - // (unfiltered) popular Documents. If you only want results strictly - // matching the filters, set `strictFiltering` to True in - // RecommendRequest.params to receive empty results instead. Note that - // the API will never return Documents with `storageStatus` of `EXPIRED` - // or `DELETED` regardless of filter choices. - Filter string `json:"filter,omitempty"` - - // PageSize: Maximum number of results to return. Set this property to - // the number of recommendation results needed. If zero, the service - // will choose a reasonable default. The maximum allowed value is 100. - // Values above 100 will be coerced to 100. - PageSize int64 `json:"pageSize,omitempty"` - - // Params: Additional domain specific parameters for the - // recommendations. Allowed values: * `returnDocument`: Boolean. If set - // to true, the associated Document object will be returned in - // RecommendResponse.RecommendationResult.document. * `returnScore`: - // Boolean. If set to true, the recommendation 'score' corresponding to - // each returned Document will be set in - // RecommendResponse.RecommendationResult.metadata. The given 'score' - // indicates the probability of a Document conversion given the user's - // context and history. * `strictFiltering`: Boolean. True by default. - // If set to false, the service will return generic (unfiltered) popular - // Documents instead of empty if your filter blocks all recommendation - // results. * `diversityLevel`: String. Default empty. If set to be - // non-empty, then it needs to be one of: * `no-diversity` * - // `low-diversity` * `medium-diversity` * `high-diversity` * - // `auto-diversity` This gives request-level control and adjusts - // recommendation results based on Document category. * - // `attributeFilteringSyntax`: Boolean. False by default. If set to - // true, the `filter` field is interpreted according to the new, - // attribute-based syntax. - Params googleapi.RawMessage `json:"params,omitempty"` - - // UserEvent: Required. Context about the user, what they are looking at - // and what action they took to trigger the Recommend request. Note that - // this user event detail won't be ingested to userEvent logs. Thus, a - // separate userEvent write request is required for event logging. Don't - // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the - // same fixed ID for different users. If you are trying to receive - // non-personalized recommendations (not recommended; this can - // negatively impact model performance), instead set - // UserEvent.user_pseudo_id to a random unique ID and leave - // UserEvent.user_info.user_id unset. - UserEvent *GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvent,omitempty"` - - // UserLabels: The user labels applied to a resource must meet the - // following requirements: * Each resource can have multiple labels, up - // to a maximum of 64. * Each label must be a key-value pair. * Keys - // have a minimum length of 1 character and a maximum length of 63 - // characters and cannot be empty. Values can be empty and have a - // maximum length of 63 characters. * Keys and values can contain only - // lowercase letters, numeric characters, underscores, and dashes. All - // characters must use UTF-8 encoding, and international characters are - // allowed. * The key portion of a label must be unique. However, you - // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Requirements for - // labels - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` - - // ValidateOnly: Use validate only mode for this recommendation query. - // If set to true, a fake model will be used that returns arbitrary - // Document IDs. Note that the validate only mode should only be used - // for testing the API, or if the model is not ready. - ValidateOnly bool `json:"validateOnly,omitempty"` +// GoogleCloudDiscoveryengineV1alphaFieldConfig: Configurations for +// fields of a schema. For example, configuring a field is indexable, or +// searchable. +type GoogleCloudDiscoveryengineV1alphaFieldConfig struct { + // CompletableOption: If completable_option is COMPLETABLE_ENABLED, + // field values are directly used and returned as suggestions for + // Autocomplete in CompletionService.CompleteQuery. If + // completable_option is unset, the server behavior defaults to + // COMPLETABLE_DISABLED for fields that support setting completable + // options, which are just `string` fields. For those fields that do not + // support setting completable options, the server will skip completable + // option setting, and setting completable_option for those fields will + // throw `INVALID_ARGUMENT` error. + // + // Possible values: + // "COMPLETABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "COMPLETABLE_ENABLED" - Completable option enabled for a schema + // field. + // "COMPLETABLE_DISABLED" - Completable option disabled for a schema + // field. + CompletableOption string `json:"completableOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // DynamicFacetableOption: If dynamic_facetable_option is + // DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic + // facet. Could only be DYNAMIC_FACETABLE_DISABLED if + // FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an + // `INVALID_ARGUMENT` error will be returned. If + // dynamic_facetable_option is unset, the server behavior defaults to + // DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic + // facetable options. For those fields that do not support setting + // dynamic facetable options, such as `object` and `boolean`, the server + // will skip dynamic facetable option setting, and setting + // dynamic_facetable_option for those fields will throw + // `INVALID_ARGUMENT` error. + // + // Possible values: + // "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "DYNAMIC_FACETABLE_ENABLED" - Dynamic facetable option enabled for + // a schema field. + // "DYNAMIC_FACETABLE_DISABLED" - Dynamic facetable option disabled + // for a schema field. + DynamicFacetableOption string `json:"dynamicFacetableOption,omitempty"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // FieldPath: Required. Field path of the schema field. For example: + // `title`, `description`, `release_info.release_year`. + FieldPath string `json:"fieldPath,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaRecommendRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // FieldType: Output only. Raw type of the field. + // + // Possible values: + // "FIELD_TYPE_UNSPECIFIED" - Field type is unspecified. + // "OBJECT" - Field value type is Object. + // "STRING" - Field value type is String. + // "NUMBER" - Field value type is Number. + // "INTEGER" - Field value type is Integer. + // "BOOLEAN" - Field value type is Boolean. + // "GEOLOCATION" - Field value type is Geolocation. + // "DATETIME" - Field value type is Datetime. + FieldType string `json:"fieldType,omitempty"` -// GoogleCloudDiscoveryengineV1alphaRecommendResponse: Response message -// for Recommend method. -type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { - // AttributionToken: A unique attribution token. This should be included - // in the UserEvent logs resulting from this recommendation, which - // enables accurate attribution of recommendation model performance. - AttributionToken string `json:"attributionToken,omitempty"` + // IndexableOption: If indexable_option is INDEXABLE_ENABLED, field + // values are indexed so that it can be filtered or faceted in + // SearchService.Search. If indexable_option is unset, the server + // behavior defaults to INDEXABLE_DISABLED for fields that support + // setting indexable options. For those fields that do not support + // setting indexable options, such as `object` and `boolean` and key + // properties, the server will skip indexable_option setting, and + // setting indexable_option for those fields will throw + // `INVALID_ARGUMENT` error. + // + // Possible values: + // "INDEXABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "INDEXABLE_ENABLED" - Indexable option enabled for a schema field. + // "INDEXABLE_DISABLED" - Indexable option disabled for a schema + // field. + IndexableOption string `json:"indexableOption,omitempty"` - // MissingIds: IDs of documents in the request that were missing from - // the default Branch associated with the requested ServingConfig. - MissingIds []string `json:"missingIds,omitempty"` + // KeyPropertyType: Output only. Type of the key property that this + // field is mapped to. Empty string if this is not annotated as mapped + // to a key property. Example types are `title`, `description`. Full + // list is defined by `keyPropertyMapping` in the schema field + // annotation. If the schema field has a `KeyPropertyMapping` + // annotation, `indexable_option` and `searchable_option` of this field + // cannot be modified. + KeyPropertyType string `json:"keyPropertyType,omitempty"` - // Results: A list of recommended Documents. The order represents the - // ranking (from the most relevant Document to the least). - Results []*GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult `json:"results,omitempty"` + // RecsFilterableOption: If recs_filterable_option is + // FILTERABLE_ENABLED, field values are filterable by filter expression + // in RecommendationService.Recommend. If FILTERABLE_ENABLED but the + // field type is numerical, field values are not filterable by text + // queries in RecommendationService.Recommend. Only textual fields are + // supported. If recs_filterable_option is unset, the default setting is + // FILTERABLE_DISABLED for fields that support setting filterable + // options. When a field set to [FILTERABLE_DISABLED] is filtered, a + // warning is generated and an empty result is returned. + // + // Possible values: + // "FILTERABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "FILTERABLE_ENABLED" - Filterable option enabled for a schema + // field. + // "FILTERABLE_DISABLED" - Filterable option disabled for a schema + // field. + RecsFilterableOption string `json:"recsFilterableOption,omitempty"` - // ValidateOnly: True if RecommendRequest.validate_only was set. - ValidateOnly bool `json:"validateOnly,omitempty"` + // RetrievableOption: If retrievable_option is RETRIEVABLE_ENABLED, + // field values are included in the search results. If + // retrievable_option is unset, the server behavior defaults to + // RETRIEVABLE_DISABLED for fields that support setting retrievable + // options. For those fields that do not support setting retrievable + // options, such as `object` and `boolean`, the server will skip + // retrievable option setting, and setting retrievable_option for those + // fields will throw `INVALID_ARGUMENT` error. + // + // Possible values: + // "RETRIEVABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "RETRIEVABLE_ENABLED" - Retrievable option enabled for a schema + // field. + // "RETRIEVABLE_DISABLED" - Retrievable option disabled for a schema + // field. + RetrievableOption string `json:"retrievableOption,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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 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. + // + // Possible values: + // "SEARCHABLE_OPTION_UNSPECIFIED" - Value used when unset. + // "SEARCHABLE_ENABLED" - Searchable option enabled for a schema + // field. + // "SEARCHABLE_DISABLED" - Searchable option disabled for a schema + // field. + SearchableOption string `json:"searchableOption,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributionToken") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CompletableOption") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributionToken") to + // NullFields is a list of field names (e.g. "CompletableOption") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -8039,29 +7634,37 @@ type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponse +func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFieldConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult -// : RecommendationResult represents a generic recommendation result -// with associated metadata. -type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult struct { - // Document: Set if `returnDocument` is set to true in - // RecommendRequest.params. - Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` +// GoogleCloudDiscoveryengineV1alphaFirestoreSource: Firestore source +// import data from. +type GoogleCloudDiscoveryengineV1alphaFirestoreSource struct { + // CollectionId: Required. The Firestore collection to copy the data + // from with a length limit of 1,500 characters. + CollectionId string `json:"collectionId,omitempty"` - // Id: Resource ID of the recommended Document. - Id string `json:"id,omitempty"` + // DatabaseId: Required. The Firestore database to copy the data from + // with a length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` - // Metadata: Additional Document metadata / annotations. Possible - // values: * `score`: Recommendation score in double value. Is set if - // `returnScore` is set to true in RecommendRequest.params. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the Firestore export to a specific Cloud Storage + // directory. Please ensure that the Firestore service account has the + // necessary Cloud Storage Admin permissions to access the specified + // Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to + // ProjectId: The project ID that the Cloud SQL source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CollectionId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8069,53 +7672,49 @@ type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CollectionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult +func (s *GoogleCloudDiscoveryengineV1alphaFirestoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaFirestoreSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata: Metadata -// related to the progress of the SiteSearchEngineService.RecrawlUris -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // InvalidUris: Unique URIs in the request that don't match any - // TargetSite in the DataStore, only match TargetSites that haven't been - // fully indexed, or match a TargetSite with type EXCLUDE. - InvalidUris []string `json:"invalidUris,omitempty"` - - // PendingCount: Total number of URIs that have yet to be crawled. - PendingCount int64 `json:"pendingCount,omitempty"` - - // QuotaExceededCount: Total number of URIs that were rejected due to - // insufficient indexing resources. - QuotaExceededCount int64 `json:"quotaExceededCount,omitempty"` - - // SuccessCount: Total number of URIs that have been crawled so far. - SuccessCount int64 `json:"successCount,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaGcsSource: Cloud Storage location +// for input content. +type GoogleCloudDiscoveryengineV1alphaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for document imports: * `document` (default): One + // JSON Document per line. Each document must have a valid Document.id. + // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + // `input_uris` becomes a document, with the ID set to the first 128 + // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom + // data JSON per row in arbitrary format that conforms to the defined + // Schema of the data store. This can only be used by the GENERIC Data + // Store vertical. * `csv`: A CSV file with header conforming to the + // defined Schema of the data store. Each entry after the header is + // imported as a Document. This can only be used by the GENERIC Data + // Store vertical. Supported values for user even imports: * + // `user_event` (default): One JSON UserEvent per line. + DataSchema string `json:"dataSchema,omitempty"` - // ValidUrisCount: Total number of unique URIs in the request that are - // not in invalid_uris. - ValidUrisCount int64 `json:"validUrisCount,omitempty"` + // InputUris: Required. Cloud Storage URIs to input files. URI can be up + // to 2000 characters long. URIs can match the full object path (for + // example, `gs://bucket/directory/object.json`) or a pattern matching + // one or more files, such as `gs://bucket/directory/*.json`. A request + // can contain at most 100 files (or 100,000 files if `data_schema` is + // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` + // is `content`). + InputUris []string `json:"inputUris,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "DataSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8123,7 +7722,7 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "DataSchema") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8132,21 +7731,24 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata +func (s *GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGcsSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest: Request message -// for SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { - // Uris: Required. List of URIs to crawl. At most 10K URIs are - // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI - // should match at least one TargetSite in `site_search_engine`. - Uris []string `json:"uris,omitempty"` +// GoogleCloudDiscoveryengineV1alphaGroundingFact: Grounding Fact. +type GoogleCloudDiscoveryengineV1alphaGroundingFact struct { + // Attributes: Attributes associated with the fact. Common attributes + // include `source` (indicating where the fact was sourced from), + // `author` (indicating the author of the fact), and so on. + Attributes map[string]string `json:"attributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to + // FactText: Text content of the fact. Can be at most 10K characters + // long. + FactText string `json:"factText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attributes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8154,8 +7756,8 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uris") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8163,64 +7765,75 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest +func (s *GoogleCloudDiscoveryengineV1alphaGroundingFact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGroundingFact raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse: Response -// message for SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { - // FailedUris: URIs that were not crawled before the LRO terminated. - FailedUris []string `json:"failedUris,omitempty"` +// GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec: Defines guided +// search spec. +type GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec struct { + // EnableRefinementAttributes: Whether or not to enable and include + // refinement attributes in gudied search result. + EnableRefinementAttributes bool `json:"enableRefinementAttributes,omitempty"` - // FailureSamples: Details for a sample of up to 10 `failed_uris`. - FailureSamples []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo `json:"failureSamples,omitempty"` + // EnableRelatedQuestions: Whether or not to enable and include related + // questions in search response. + EnableRelatedQuestions bool `json:"enableRelatedQuestions,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailedUris") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // MaxRelatedQuestions: Max number of related questions to be returned. + // The valid range is [1, 5]. If enable_related_questions is true, the + // default value is 3. + MaxRelatedQuestions int64 `json:"maxRelatedQuestions,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableRefinementAttributes") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailedUris") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. + // "EnableRefinementAttributes") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse +func (s *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo: -// Details about why a particular URI failed to be crawled. Each -// FailureInfo contains one FailureReason per CorpusType. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { - // FailureReasons: List of failure reasons by corpus type (e.g. desktop, - // mobile). - FailureReasons []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason `json:"failureReasons,omitempty"` +// GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { + // ExternalIdpConfig: External Identity provider config. + ExternalIdpConfig *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig `json:"externalIdpConfig,omitempty"` - // Uri: URI that failed to be crawled. - Uri string `json:"uri,omitempty"` + // IdpType: Identity provider type configured. + // + // Possible values: + // "IDP_TYPE_UNSPECIFIED" - Default value. ACL search not enabled. + // "GSUITE" - Google 1P provider. + // "THIRD_PARTY" - Third party provider. + IdpType string `json:"idpType,omitempty"` - // ForceSendFields is a list of field names (e.g. "FailureReasons") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ExternalIdpConfig") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FailureReasons") to + // NullFields is a list of field names (e.g. "ExternalIdpConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -8230,104 +7843,56 @@ type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo +func (s *GoogleCloudDiscoveryengineV1alphaIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailure -// Reason: Details about why crawling failed for a particular -// CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different -// reasons. -type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason struct { - // CorpusType: DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. - // - // Possible values: - // "CORPUS_TYPE_UNSPECIFIED" - Default value. - // "DESKTOP" - Denotes a crawling attempt for the desktop version of a - // page. - // "MOBILE" - Denotes a crawling attempt for the mobile version of a - // page. - CorpusType string `json:"corpusType,omitempty"` - - // ErrorMessage: Reason why the URI was not crawled. - ErrorMessage string `json:"errorMessage,omitempty"` +// GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig: Third +// party IDP Config. +type GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig struct { + // WorkforcePoolName: Workforce pool name. Example: + // "locations/global/workforcePools/pool_id" + WorkforcePoolName string `json:"workforcePoolName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorpusType") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "WorkforcePoolName") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorpusType") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "WorkforcePoolName") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason +func (s *GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaReply: Defines a reply message to -// user. -type GoogleCloudDiscoveryengineV1alphaReply struct { - // References: References in the reply. - References []*GoogleCloudDiscoveryengineV1alphaReplyReference `json:"references,omitempty"` - - // Reply: DEPRECATED: use `summary` instead. Text reply. - Reply string `json:"reply,omitempty"` - - // Summary: Summary based on search results. - Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` - - // ForceSendFields is a list of field names (e.g. "References") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "References") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaReply) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaReply - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1alphaReplyReference: Defines reference in -// reply. -type GoogleCloudDiscoveryengineV1alphaReplyReference struct { - // AnchorText: Anchor text. - AnchorText string `json:"anchorText,omitempty"` - - // End: Anchor text end index. - End int64 `json:"end,omitempty"` - - // Start: Anchor text start index. - Start int64 `json:"start,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata: +// Metadata related to the progress of the ImportCompletionSuggestions +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Uri: URI link reference. - Uri string `json:"uri,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. "AnchorText") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8335,7 +7900,7 @@ type GoogleCloudDiscoveryengineV1alphaReplyReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnchorText") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8344,41 +7909,30 @@ type GoogleCloudDiscoveryengineV1alphaReplyReference struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaReplyReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaReplyReference +func (s *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaResumeEngineRequest: Request for -// resuming training of an engine. -type GoogleCloudDiscoveryengineV1alphaResumeEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1alphaSchema struct { - // FieldConfigs: Output only. Configurations for fields of the schema. - FieldConfigs []*GoogleCloudDiscoveryengineV1alphaFieldConfig `json:"fieldConfigs,omitempty"` - - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse: +// Response of the CompletionService.ImportCompletionSuggestions method. +// If the long running operation is done, this message is returned by +// the google.longrunning.Operations.response field if the operation is +// successful. +type GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // FailureCount: Count of CompletionSuggestions that failed to be + // imported. + FailureCount int64 `json:"failureCount,omitempty,string"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SuccessCount: Count of CompletionSuggestions successfully imported. + SuccessCount int64 `json:"successCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "FieldConfigs") to + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8386,7 +7940,7 @@ type GoogleCloudDiscoveryengineV1alphaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldConfigs") to include + // NullFields is a list of field names (e.g. "ErrorSamples") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -8395,40 +7949,34 @@ type GoogleCloudDiscoveryengineV1alphaSchema struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSchema +func (s *GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchInfo: Detailed search -// information. -type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { - // Offset: An integer that specifies the current offset for pagination - // (the 0-indexed starting location, amongst the products deemed by the - // API as relevant). See SearchRequest.offset for definition. If this - // field is negative, an `INVALID_ARGUMENT` is returned. This can only - // be set for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - Offset int64 `json:"offset,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // OrderBy: The order in which products are returned, if applicable. See - // SearchRequest.order_by for definition and syntax. The value must be a - // UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be - // set for `search` events. Other event types should not set this field. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - OrderBy string `json:"orderBy,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // SearchQuery: The user's search query. See SearchRequest.query for - // definition. The value must be a UTF-8 encoded string with a length - // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is - // returned. At least one of search_query or PageInfo.page_category is - // required for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - SearchQuery string `json:"searchQuery,omitempty"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Offset") to + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8436,8 +7984,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Offset") to include in API - // requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8445,192 +7993,125 @@ type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchInfo +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { - // BoostSpec: Boost specification to boost certain documents. For more - // information on boosting, see Boosting - // (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - - // Branch: The branch resource name, such as - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store/branches/0`. Use `default_branch` as the branch - // ID or leave this field empty, to search documents under the default - // branch. - Branch string `json:"branch,omitempty"` - - // CanonicalFilter: The default filter that is applied when a user - // performs a search without checking any filters on the search page. - // The filter applied to every search request when quality improvement - // such as query expansion is needed. In the case a query does not have - // a sufficient amount of results this filter will be used to determine - // whether or not to enable the query expansion flow. The original - // filter will still be used for the query expanded search. This field - // is strongly recommended to achieve high search quality. For more - // information about filter syntax, see SearchRequest.filter. - CanonicalFilter string `json:"canonicalFilter,omitempty"` - - // ContentSearchSpec: A specification for configuring the behavior of - // content search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - - // CustomFineTuningSpec: Custom fine tuning configs. - CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` - - // DataStoreSpecs: A list of data store specs to apply on a search call. - DataStoreSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` - - // EmbeddingSpec: Uses the provided embedding to do additional semantic - // document retrieval. The retrieval is based on the dot product of - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document - // embedding that is provided in - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not - // provided, it will use ServingConfig.EmbeddingConfig.field_path. - EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` - - // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, - // an `INVALID_ARGUMENT` error is returned. - FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest: Request +// message for Import methods. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest struct { + // AutoGenerateIds: Whether to automatically generate IDs for the + // documents if absent. If set to `true`, Document.ids are automatically + // generated based on the hash of the payload, where IDs may not be + // consistent during multiple imports. In which case + // ReconciliationMode.FULL is highly recommended to avoid duplicate + // contents. If unset or set to `false`, Document.ids have to be + // specified using id_field, otherwise, documents without IDs fail to be + // imported. Supported data sources: * GcsSource. GcsSource.data_schema + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is + // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` + // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * + // SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. + AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. Filter expression is case-sensitive. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in - // Vertex AI Search is done by mapping the LHS filter key to a key - // property defined in the Vertex AI Search backend -- this mapping is - // defined by the customer in their schema. For example a media customer - // might have a field 'name' in their schema. In this case the filter - // would look like this: filter --> name:'ANY("king kong")' For more - // information about filtering including syntax and filter operators, - // see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - // ImageQuery: Raw image query. - ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` + // BigtableSource: Cloud Bigtable input source. + BigtableSource *GoogleCloudDiscoveryengineV1alphaBigtableSource `json:"bigtableSource,omitempty"` - // Offset: A 0-indexed integer that specifies the current offset (that - // is, starting result location, amongst the Documents deemed by the API - // as relevant) in search results. This field is only considered if - // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` - // is returned. - Offset int64 `json:"offset,omitempty"` + // CloudSqlSource: Cloud SQL input source. + CloudSqlSource *GoogleCloudDiscoveryengineV1alphaCloudSqlSource `json:"cloudSqlSource,omitempty"` - // OrderBy: The order in which documents are returned. Documents can be - // ordered by a field in an Document object. Leave it unset if ordered - // by relevance. `order_by` expression is case-sensitive. For more - // information on ordering, see Ordering - // (https://cloud.google.com/retail/docs/filter-and-order#order) If this - // field is unrecognizable, an `INVALID_ARGUMENT` is returned. - OrderBy string `json:"orderBy,omitempty"` + // ErrorConfig: The desired location of errors incurred during the + // Import. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // PageSize: Maximum number of Documents to return. If unspecified, - // defaults to a reasonable value. The maximum allowed value is 100. - // Values above 100 are coerced to 100. If this field is negative, an - // `INVALID_ARGUMENT` is returned. - PageSize int64 `json:"pageSize,omitempty"` + // FhirStoreSource: FhirStore input source. + FhirStoreSource *GoogleCloudDiscoveryengineV1alphaFhirStoreSource `json:"fhirStoreSource,omitempty"` - // PageToken: A page token received from a previous SearchService.Search - // call. Provide this to retrieve the subsequent page. When paginating, - // all other parameters provided to SearchService.Search must match the - // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - PageToken string `json:"pageToken,omitempty"` + // FirestoreSource: Firestore input source. + FirestoreSource *GoogleCloudDiscoveryengineV1alphaFirestoreSource `json:"firestoreSource,omitempty"` - // Params: Additional search parameters. For public website search only, - // supported values are: * `user_country_code`: string. Default empty. - // If set to non-empty, results are restricted or boosted based on the - // location provided. Example: user_country_code: "au" For available - // codes see Country Codes - // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) - // * `search_type`: double. Default empty. Enables non-webpage searching - // depending on the value. The only valid non-default value is 1, which - // enables image searching. Example: search_type: 1 - Params googleapi.RawMessage `json:"params,omitempty"` + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - // Query: Raw search query. - Query string `json:"query,omitempty"` + // IdField: The field indicates the ID field or column to be used as + // unique IDs of the documents. For GcsSource it is the key of the JSON + // field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For + // others, it may be the column name of the table where the unique ids + // are stored. The values of the JSON field or the table column are used + // as the Document.ids. The JSON field or the table column must be of + // string type, and the values must be set as valid strings conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) with 1-63 characters. + // Otherwise, documents without valid IDs fail to be imported. Only set + // this field when auto_generate_ids is unset or set as `false`. + // Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a + // default value `_id` is used when importing from the allowed data + // sources. Supported data sources: * GcsSource. GcsSource.data_schema + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is + // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` + // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * + // SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. + IdField string `json:"idField,omitempty"` - // QueryExpansionSpec: The query expansion specification that specifies - // the conditions under which query expansion occurs. - QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` - // RankingExpression: The ranking expression controls the customized - // ranking on retrieval documents. This overrides - // ServingConfig.ranking_expression. The ranking expression is a single - // function or multiple functions that are joint by "+". * - // ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: - // `relevance_score`: pre-defined keywords, used for measure relevance - // between query and document. `embedding_field_path`: the document - // embedding field used with query embedding vector. `dotProduct`: - // embedding function between embedding_field_path and query embedding - // vector. Example ranking expression: If document has an embedding - // field doc_embedding, the ranking expression could be `0.5 * - // relevance_score + 0.3 * dotProduct(doc_embedding)`. - RankingExpression string `json:"rankingExpression,omitempty"` + // ReconciliationMode: The mode of reconciliation between existing + // documents and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. + // "INCREMENTAL" - Inserts new documents or updates existing + // documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the + // source location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` - // SafeSearch: Whether to turn on safe search. This is only supported - // for website search. - SafeSearch bool `json:"safeSearch,omitempty"` + // SpannerSource: Spanner input source. + SpannerSource *GoogleCloudDiscoveryengineV1alphaSpannerSource `json:"spannerSource,omitempty"` - // ServingConfig: Required. The resource name of the Search serving - // config, such as - // `projects/*/locations/global/collections/default_collection/engines/*/ - // servingConfigs/default_serving_config`, or - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store/servingConfigs/default_serving_config`. This - // field is used to identify the serving configuration name, set of - // models used to make the search. - ServingConfig string `json:"servingConfig,omitempty"` + // UpdateMask: Indicates which fields in the provided imported documents + // to update. If not set, the default is to update all fields. + UpdateMask string `json:"updateMask,omitempty"` - // SpellCorrectionSpec: The spell correction specification that - // specifies the mode under which spell correction takes effect. - SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoGenerateIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // UserInfo: Information about the end user. Highly recommended for - // analytics. UserInfo.user_agent is used to deduce `device_type` for - // analytics. - UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + // NullFields is a list of field names (e.g. "AutoGenerateIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // 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"` +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // UserPseudoId: A unique identifier for tracking visitors. For example, - // this could be implemented with an HTTP cookie, which should be able - // to uniquely identify a visitor on a single device. This unique - // identifier should not change if the visitor logs in or out of the - // website. This field should NOT have a fixed value such as - // `unknown_visitor`. This should be the same identifier as - // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserPseudoId string `json:"userPseudoId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource: +// The inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each + // document must have a valid Document.id. Recommended max of 100 items. + Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // ForceSendFields is a list of field names (e.g. "Documents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8638,7 +8119,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") to include in + // NullFields is a list of field names (e.g. "Documents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8647,75 +8128,59 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost -// specification to boost certain documents. -type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { - // ConditionBoostSpecs: Condition boost specifications. If a document - // matches multiple conditions in the specifictions, boost scores from - // these specifications are all applied and combined in a non-linear - // way. Maximum number of specifications is 20. - ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") - // to unconditionally include in API requests. By default, fields with + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS -// pec: Boost applies to documents which match a condition. -type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { - // Boost: Strength of the condition boost, which should be in [-1, 1]. - // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives - // the document a big promotion. However, it does not necessarily mean - // that the boosted document will be the top result at all times, nor - // that other documents will be excluded. Results could still be shown - // even when none of them matches the condition. And results that are - // significantly more relevant to the search query can still trump your - // heavily favored but irrelevant documents. Setting to -1.0 gives the - // document a big demotion. However, results that are deeply relevant - // might still be shown. The document will have an upstream battle to - // get a fairly high ranking, but it is not blocked out completely. - // Setting to 0.0 means no boost applied. The boosting condition is - // ignored. Only one of the (condition, boost) combination or the - // boost_control_spec below are set. If both are set then the global - // boost is ignored and the more fine-grained boost_control_spec is - // applied. - Boost float64 `json:"boost,omitempty"` - - // Condition: An expression which specifies a boost condition. The - // syntax and supported fields are the same as a filter expression. See - // SearchRequest.filter for detail syntax and limitations. Examples: * - // To boost documents with document ID "doc_1" or "doc_2", and color - // "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: - // ANY("Red", "Blue"))` - Condition string `json:"condition,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1alphaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8723,8 +8188,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec s // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8732,60 +8197,25 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec s NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportErrorConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A -// specification for configuring the behavior of content search. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { - // ChunkSpec: Specifies the chunk spec to be returned from the search - // response. Only available if the - // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS - ChunkSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` - - // ExtractiveContentSpec: If there is no extractive_content_spec - // provided, there will be no extractive answer in the search response. - ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` - - // SearchResultMode: Specifies the search result mode. If unspecified, - // the search result mode is based on - // DataStore.DocumentProcessingConfig.chunking_config: * If - // DataStore.DocumentProcessingConfig.chunking_config is specified, it - // defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. - // - // Possible values: - // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. - // "DOCUMENTS" - Returns documents in the search result. - // "CHUNKS" - Returns chunks in the search result. Only available if - // the DataStore.DocumentProcessingConfig.chunking_config is specified. - SearchResultMode string `json:"searchResultMode,omitempty"` - - // SnippetSpec: If `snippetSpec` is not specified, snippets are not - // included in the search response. - SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetada +// ta: Metadata related to the progress of the +// ImportSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // SummarySpec: If `summarySpec` is not specified, summaries are not - // included in the search response. - SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,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. "ChunkSpec") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8793,7 +8223,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkSpec") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8802,28 +8232,28 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSp -// ec: Specifies the chunk spec to be returned from the search response. -// Only available if the -// SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec struct { - // NumNextChunks: The number of next chunks to be returned of the - // current chunk. The maximum allowed value is 3. If not specified, no - // next chunks will be returned. - NumNextChunks int64 `json:"numNextChunks,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesReques +// t: Request message for +// CompletionService.ImportSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest struct { + // GcsSource: Cloud Storage location for the input content. Only 1 file + // can be specified that contains all entries to import. Supported + // values `gcs_source.schema` for autocomplete suggestion deny list + // entry imports: * `suggestion_deny_list` (default): One JSON + // [SuggestionDenyListEntry] per line. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` - // NumPreviousChunks: The number of previous chunks to be returned of - // the current chunk. The maximum allowed value is 3. If not specified, - // no previous chunks will be returned. - NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // InlineSource: The Inline source for the input content for suggestion + // deny list entries. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "NumNextChunks") to + // ForceSendFields is a list of field names (e.g. "GcsSource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8831,107 +8261,68 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NumNextChunks") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "GcsSource") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtract -// iveContentSpec: A specification for configuring the extractive -// content in a search response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { - // MaxExtractiveAnswerCount: The maximum number of extractive answers - // returned in each search result. An extractive answer is a verbatim - // answer extracted from the original document, which provides a precise - // and contextually relevant answer to the search query. If the number - // of matching answers is less than the `max_extractive_answer_count`, - // return all of the answers. Otherwise, return the - // `max_extractive_answer_count`. At most five answers are returned for - // each SearchResult. - MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` - - // MaxExtractiveSegmentCount: The max number of extractive segments - // returned in each search result. Only applied if the DataStore is set - // to DataStore.ContentConfig.CONTENT_REQUIRED or - // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment - // is a text segment extracted from the original document that is - // relevant to the search query, and, in general, more verbose than an - // extractive answer. The segment could then be used as input for LLMs - // to generate summaries and answers. If the number of matching segments - // is less than `max_extractive_segment_count`, return all of the - // segments. Otherwise, return the `max_extractive_segment_count`. - MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` - - // NumNextSegments: Return at most `num_next_segments` segments after - // each selected segments. - NumNextSegments int64 `json:"numNextSegments,omitempty"` - - // NumPreviousSegments: Specifies whether to also include the adjacent - // from each selected segments. Return at most `num_previous_segments` - // segments before each selected segments. - NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` - - // ReturnExtractiveSegmentScore: Specifies whether to return the - // confidence score from the extractive segments in each search result. - // This feature is available only for new or allowlisted data stores. To - // allowlist your data store, please contact your Customer Engineer. The - // default value is `false`. - ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesReques +// tInlineSource: The inline source for SuggestionDenyListEntry. +type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource struct { + // Entries: Required. A list of all denylist entries to import. Max of + // 1000 items. + Entries []*GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MaxExtractiveAnswerCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "Entries") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Entries") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippet -// Spec: A specification for configuring snippets in a search response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { - // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control - // snippet return, use `return_snippet` field. For backwards - // compatibility, we will return snippet if max_snippet_count > 0. - MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRespon +// se: Response message for +// CompletionService.ImportSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no - // affect on the snippet. - ReferenceOnly bool `json:"referenceOnly,omitempty"` + // FailedEntriesCount: Count of deny list entries that failed to be + // imported. + FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` - // ReturnSnippet: If `true`, then return snippet. If no snippet can be - // generated, we return "No snippet is available for this page." A - // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also - // be returned. - ReturnSnippet bool `json:"returnSnippet,omitempty"` + // ImportedEntriesCount: Count of deny list entries successfully + // imported. + ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8939,123 +8330,79 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSnippetCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary -// Spec: A specification for configuring a summary returned in a search -// response. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { - // IgnoreAdversarialQuery: Specifies whether to filter out adversarial - // queries. The default value is `false`. Google employs search-query - // classification to detect adversarial queries. No summary is returned - // if the search query is classified as an adversarial query. For - // example, a user might ask a question regarding negative comments - // about the company or submit a query designed to generate unsafe, - // policy-violating output. If this field is set to `true`, we skip - // generating summaries for adversarial queries and return fallback - // messages instead. - IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - - // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries - // that are not summary-seeking. The default value is `false`. Google - // employs search-query classification to detect summary-seeking - // queries. No summary is returned if the search query is classified as - // a non-summary seeking query. For example, `why is the sky blue` and - // `Who is the best soccer player in the world?` are summary-seeking - // queries, but `SFO airport` and `world cup 2026` are not. They are - // most likely navigational queries. If this field is set to `true`, we - // skip generating summaries for non-summary seeking queries and return - // fallback messages instead. - IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - - // IncludeCitations: Specifies whether to include citations in the - // summary. The default value is `false`. When this field is set to - // `true`, summaries include in-line citation numbers. Example summary - // including citations: BigQuery is Google Cloud's fully managed and - // completely serverless enterprise data warehouse [1]. BigQuery - // supports all data types, works across clouds, and has built-in - // machine learning and business intelligence, all within a unified - // platform [2, 3]. The citation numbers refer to the returned search - // results and are 1-indexed. For example, [1] means that the sentence - // is attributed to the first search result. [2, 3] means that the - // sentence is attributed to both the second and third search results. - IncludeCitations bool `json:"includeCitations,omitempty"` - - // LanguageCode: Language code for Summary. Use language tags defined by - // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is - // an experimental feature. - LanguageCode string `json:"languageCode,omitempty"` - - // ModelPromptSpec: If specified, the spec will be used to modify the - // prompt provided to the LLM. - ModelPromptSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ModelSpec: If specified, the spec will be used to modify the model - // specification provided to the LLM. - ModelSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // SummaryResultCount: The number of top results to generate the summary - // from. If the number of results returned is less than - // `summaryResultCount`, the summary is generated from all of the - // results. At most 10 results can be used to generate a summary. - SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // UseSemanticChunks: If true, answer will be generated from most - // relevant chunks from top search results. This feature will improve - // summary quality. Please note that with this feature enabled, not all - // top search results will be referenced and included in the reference - // list, so the citation source index only points to the search results - // listed in the reference list. - UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // 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. - // "IgnoreAdversarialQuery") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary -// SpecModelPromptSpec: Specification of the prompt to use with the -// model. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { - // Preamble: Text at the beginning of the prompt that instructs the - // assistant. Examples are available in the user guide. - Preamble string `json:"preamble,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest: Request +// message for the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1alphaBigQuerySource `json:"bigquerySource,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preamble") to + // ErrorConfig: The desired location of errors incurred during the + // Import. Cannot be set for inline user event imports. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` + + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: The Inline source for the input content for UserEvents. + InlineSource *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigquerySource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9063,35 +8410,30 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecM // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preamble") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BigquerySource") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary -// SpecModelSpec: Specification of the model. -type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec struct { - // Version: The model version used to generate the summary. Supported - // values are: * `stable`: string. Default value when no value is - // specified. Uses a generally available, fine-tuned model. For more - // information, see Answer generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). - // * `preview`: string. (Public preview) Uses a preview model. For more - // information, see Answer generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). - Version string `json:"version,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource: +// The inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended + // max of 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvents,omitempty"` - // ForceSendFields is a list of field names (e.g. "Version") to + // ForceSendFields is a list of field names (e.g. "UserEvents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9099,7 +8441,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecM // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Version") to include in + // NullFields is a list of field names (e.g. "UserEvents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9108,21 +8450,35 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecM NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec: A struct -// to define data stores to filter on in a search call. -type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { - // DataStore: Required. Full resource name of DataStore, such as - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}`. - DataStore string `json:"dataStore,omitempty"` +// GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse: Response +// of the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9130,30 +8486,36 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec +func (s *GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The -// specification that uses customized query embedding vector to do -// semantic document retrieval. -type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { - // EmbeddingVectors: The embedding vector used for retrieval. Limit to - // 1. - EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` +// GoogleCloudDiscoveryengineV1alphaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1alphaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` + + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` + + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9161,7 +8523,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EmbeddingVectors") to + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9171,22 +8533,48 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec +func (s *GoogleCloudDiscoveryengineV1alphaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVe -// ctor: Embedding vector. -type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { - // FieldPath: Embedding field path in schema. - FieldPath string `json:"fieldPath,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} - // Vector: Query embedding vector. - Vector []float64 `json:"vector,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListChunksResponse: Response message +// for ChunkService.ListChunks method. +type GoogleCloudDiscoveryengineV1alphaListChunksResponse struct { + // Chunks: The Chunks. + Chunks []*GoogleCloudDiscoveryengineV1alphaChunk `json:"chunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // NextPageToken: A token that can be sent as + // ListChunksRequest.page_token to retrieve the next page. If this field + // is omitted, there are no subsequent pages. + 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. "Chunks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9194,8 +8582,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Chunks") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9203,158 +8591,27 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector - var s1 struct { - Vector []gensupport.JSONFloat64 `json:"vector"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Vector = make([]float64, len(s1.Vector)) - for i := range s1.Vector { - s.Vector[i] = float64(s1.Vector[i]) - } - return nil -} - -// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet -// specification to perform faceted search. -type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { - // EnableDynamicPosition: Enables dynamic position for this facet. If - // set to true, the position of this facet among all facets in the - // response is determined automatically. If dynamic facets are enabled, - // it is ordered together. If set to false, the position of this facet - // in the response is the same as in the request, and it is ranked - // before the facets with dynamic position enable and all dynamic - // facets. For example, you may always want to have rating facet - // returned in the response, but it's not necessarily to always display - // the rating facet at the top. In that case, you can set - // enable_dynamic_position to true so that the position of rating facet - // in response is determined automatically. Another example, assuming - // you have the following facets in the request: * "rating", - // enable_dynamic_position = true * "price", enable_dynamic_position = - // false * "brands", enable_dynamic_position = false And also you have a - // dynamic facets enabled, which generates a facet `gender`. Then the - // final order of the facets in the response can be ("price", "brands", - // "rating", "gender") or ("price", "brands", "gender", "rating") - // depends on how API orders "gender" and "rating" facets. However, - // notice that "price" and "brands" are always ranked at first and - // second position because their enable_dynamic_position is false. - EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - - // ExcludedFilterKeys: List of keys to exclude when faceting. By - // default, FacetKey.key is not excluded from the filter unless it is - // listed in this field. Listing a facet key in this field allows its - // values to appear as facet results, even when they are filtered out of - // search results. Using this field does not affect what search results - // are returned. For example, suppose there are 100 documents with the - // color facet "Red" and 200 documents with the color facet "Blue". A - // query containing the filter "color:ANY("Red")" and having "color" as - // FacetKey.key would by default return only "Red" documents in the - // search results, and also return "Red" with count 100 as the only - // color facet. Although there are also blue documents available, "Blue" - // would not be shown as an available facet value. If "color" is listed - // in "excludedFilterKeys", then the query returns the facet values - // "Red" with count 100 and "Blue" with count 200, because the "color" - // key is now excluded from the filter. Because this field doesn't - // affect search results, the search results are still correctly - // filtered to return only "Red" documents. A maximum of 100 values are - // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. - ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` - - // FacetKey: Required. The facet key specification. - FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` - - // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is - // 300. Values above 300 are coerced to 300. If this field is negative, - // an `INVALID_ARGUMENT` is returned. - Limit int64 `json:"limit,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "EnableDynamicPosition") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "EnableDynamicPosition") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec +func (s *GoogleCloudDiscoveryengineV1alphaListChunksResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListChunksResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: -// Specifies how a facet is computed. -type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { - // CaseInsensitive: True to make facet keys case insensitive when - // getting faceting values with prefixes or contains; false otherwise. - CaseInsensitive bool `json:"caseInsensitive,omitempty"` - - // Contains: Only get facet values that contains the given strings. For - // example, suppose "category" has three values "Action > 2022", "Action - // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - // Only supported on textual fields. Maximum is 10. - Contains []string `json:"contains,omitempty"` - - // Intervals: Set only if values should be bucketed into intervals. Must - // be set for facets with numerical values. Must not be set for facet - // with text values. Maximum number of intervals is 30. - Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` - - // Key: Required. Supported textual and numerical facet keys in Document - // object, over which the facet values are computed. Facet key is - // case-sensitive. - Key string `json:"key,omitempty"` - - // OrderBy: The order in which documents are returned. Allowed values - // are: * "count desc", which means order by - // SearchResponse.Facet.values.count descending. * "value desc", which - // means order by SearchResponse.Facet.values.value descending. Only - // applies to textual facets. If not set, textual values are sorted in - // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); - // numerical intervals are sorted in the order given by - // FacetSpec.FacetKey.intervals. - OrderBy string `json:"orderBy,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListConversationsResponse: Response +// for ListConversations method. +type GoogleCloudDiscoveryengineV1alphaListConversationsResponse struct { + // Conversations: All the Conversations for a given data store. + Conversations []*GoogleCloudDiscoveryengineV1alphaConversation `json:"conversations,omitempty"` - // Prefixes: Only get facet values that start with the given string - // prefix. For example, suppose "category" has three values "Action > - // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to - // "Action", the "category" facet only contains "Action > 2022" and - // "Action > 2021". Only supported on textual fields. Maximum is 10. - Prefixes []string `json:"prefixes,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // RestrictedValues: Only get facet for the given restricted values. - // Only supported on textual fields. For example, suppose "category" has - // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If - // set "restricted_values" to "Action > 2022", the "category" facet only - // contains "Action > 2022". Only supported on textual fields. Maximum - // is 10. - RestrictedValues []string `json:"restrictedValues,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to + // ForceSendFields is a list of field names (e.g. "Conversations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9362,30 +8619,37 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaseInsensitive") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Conversations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey +func (s *GoogleCloudDiscoveryengineV1alphaListConversationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListConversationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies -// the image query input. -type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { - // ImageBytes: Base64 encoded image bytes. Supported image formats: - // JPEG, PNG, and BMP. - ImageBytes string `json:"imageBytes,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListDataStoresResponse: Response +// message for DataStoreService.ListDataStores method. +type GoogleCloudDiscoveryengineV1alphaListDataStoresResponse struct { + // DataStores: All the customer's DataStores. + DataStores []*GoogleCloudDiscoveryengineV1alphaDataStore `json:"dataStores,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImageBytes") to + // NextPageToken: A token that can be sent as + // ListDataStoresRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "DataStores") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9393,7 +8657,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImageBytes") to include in + // NullFields is a list of field names (e.g. "DataStores") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9402,33 +8666,28 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery +func (s *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListDataStoresResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: -// Specification to determine under which conditions query expansion -// should occur. -type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { - // Condition: The condition under which query expansion should occur. - // Default to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In - // this case, server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disabled query expansion. Only the exact search query - // is used, even if SearchResponse.total_size is zero. - // "AUTO" - Automatic query expansion built by the Search API. - Condition string `json:"condition,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListDocumentsResponse: Response +// message for DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1alphaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1alphaDocument `json:"documents,omitempty"` - // PinUnexpandedResults: Whether to pin unexpanded results. If this - // field is set to true, unexpanded products are always at the top of - // the search results, followed by the expanded results. - PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` + // NextPageToken: A token that can be sent as + // ListDocumentsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Documents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9436,7 +8695,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in + // NullFields is a list of field names (e.g. "Documents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9445,29 +8704,26 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec +func (s *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: -// The specification for query spell correction. -type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { - // Mode: The mode under which spell correction should take effect to - // replace the original search query. Default to Mode.AUTO. - // - // Possible values: - // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this - // case, server behavior defaults to Mode.AUTO. - // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion - // if there is any and put in the SearchResponse.corrected_query. The - // spell suggestion will not be used as the search query. - // "AUTO" - Automatic spell correction built by the Search API. Search - // will be based on the corrected query if found. - Mode string `json:"mode,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListEnginesResponse: Response +// message for EngineService.ListEngines method. +type GoogleCloudDiscoveryengineV1alphaListEnginesResponse struct { + // Engines: All the customer's Engines. + Engines []*GoogleCloudDiscoveryengineV1alphaEngine `json:"engines,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to + // NextPageToken: Not supported. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Engines") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9475,8 +8731,8 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Engines") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9484,68 +8740,28 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec +func (s *GoogleCloudDiscoveryengineV1alphaListEnginesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListEnginesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponse: Response message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { - // AppliedControls: Controls applied as part of the Control service. - AppliedControls []string `json:"appliedControls,omitempty"` - - // AttributionToken: A unique search token. This should be included in - // the UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. - AttributionToken string `json:"attributionToken,omitempty"` - - // CorrectedQuery: Contains the spell corrected query, if found. If the - // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query is used for search. - CorrectedQuery string `json:"correctedQuery,omitempty"` - - // Facets: Results of facets requested by user. - Facets []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacet `json:"facets,omitempty"` - - GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` - - // GuidedSearchResult: Guided search result. - GuidedSearchResult *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - - // NextPageToken: A token that can be sent as SearchRequest.page_token - // to retrieve the next page. If this field is omitted, there are no - // subsequent pages. +// GoogleCloudDiscoveryengineV1alphaListSchemasResponse: Response +// message for SchemaService.ListSchemas method. +type GoogleCloudDiscoveryengineV1alphaListSchemasResponse struct { + // NextPageToken: A token that can be sent as + // ListSchemasRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. NextPageToken string `json:"nextPageToken,omitempty"` - // QueryExpansionInfo: Query expansion information for the returned - // results. - QueryExpansionInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` - - // RedirectUri: The URI of a customer-defined redirect page. If redirect - // action is triggered, no search is performed, and only redirect_uri - // and attribution_token are set in the response. - RedirectUri string `json:"redirectUri,omitempty"` - - // Results: A list of matched documents. The order represents the - // ranking. - Results []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"results,omitempty"` - - // Summary: A summary as part of the search results. This field is only - // returned if SearchRequest.ContentSearchSpec.summary_spec is set. - Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` - - // TotalSize: The estimated total count of matched items irrespective of - // pagination. The count of results returned by pagination may be less - // than the total_size that matches. - TotalSize int64 `json:"totalSize,omitempty"` + // Schemas: The Schemas. + Schemas []*GoogleCloudDiscoveryengineV1alphaSchema `json:"schemas,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AppliedControls") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9553,35 +8769,36 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppliedControls") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponse +func (s *GoogleCloudDiscoveryengineV1alphaListSchemasResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSchemasResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseFacet: A facet result. -type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { - // DynamicFacet: Whether the facet is dynamically generated. - DynamicFacet bool `json:"dynamicFacet,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse: Response +// for ListServingConfigs method. +type GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // Key: The key for this facet. E.g., "colors" or "price". It matches - // SearchRequest.FacetSpec.FacetKey.key. - Key string `json:"key,omitempty"` + // ServingConfigs: All the ServingConfigs for a given dataStore. + ServingConfigs []*GoogleCloudDiscoveryengineV1alphaServingConfig `json:"servingConfigs,omitempty"` - // Values: The facet values for this field. - Values []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue `json:"values,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DynamicFacet") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9589,7 +8806,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DynamicFacet") to include + // NullFields is a list of field names (e.g. "NextPageToken") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9598,26 +8815,27 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacet +func (s *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue: A -// facet value which contains value names and their count. -type GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue struct { - // Count: Number of items that have this facet value. - Count int64 `json:"count,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // Interval: Interval value for a facet, such as 10, 20) for facet - // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. - Interval *GoogleCloudDiscoveryengineV1alphaInterval `json:"interval,omitempty"` + // Sessions: All the Sessions for a given data store. + Sessions []*GoogleCloudDiscoveryengineV1alphaSession `json:"sessions,omitempty"` - // Value: Text value of a facet, such as "Black" for facet "colors". - Value string `json:"value,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Count") to + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9625,33 +8843,41 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue +func (s *GoogleCloudDiscoveryengineV1alphaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo: -// Debug information specifically related to forward geocoding issues -// arising from Geolocation Search. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { - // ErrorMessage: The error produced. - ErrorMessage string `json:"errorMessage,omitempty"` +// GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse: Response +// message for SiteSearchEngineService.ListTargetSites method. +type GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // OriginalAddressQuery: The address from which forward geocoding - // ingestion produced issues. - OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` + // TargetSites: List of TargetSites. + TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorMessage") to + // TotalSize: The total number of items matching the request. This will + // always be populated in the response. + TotalSize int64 `json:"totalSize,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9659,7 +8885,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorMessage") to include + // NullFields is a list of field names (e.g. "NextPageToken") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9668,32 +8894,27 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo +func (s *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult: -// Guided search result. The guided search helps user to refine the -// search results and narrow down to the real needs from a broaded -// search results. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { - // FollowUpQuestions: Suggested follow-up questions. - FollowUpQuestions []string `json:"followUpQuestions,omitempty"` - - // RefinementAttributes: A list of ranked refinement attributes. - RefinementAttributes []*GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest: Request +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest struct { + // WidgetConfigId: Required. The UUID of the Widget Config. + WidgetConfigId string `json:"widgetConfigId,omitempty"` - // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "WidgetConfigId") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FollowUpQuestions") to + // NullFields is a list of field names (e.g. "WidgetConfigId") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9703,60 +8924,139 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefin -// ementAttribute: Useful attribute for search result refinements. -type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute struct { - // AttributeKey: Attribute key used to refine the results e.g. - // 'movie_type'. - AttributeKey string `json:"attributeKey,omitempty"` +// GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse: Response +// message for WidgetService.LookupWidgetConfig method. +type GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse struct { + // AnonymousWidgetConfig: The Anonymous Widget Config associated with + // the UUID. + AnonymousWidgetConfig *GoogleCloudDiscoveryengineV1alphaWidgetConfig `json:"anonymousWidgetConfig,omitempty"` - // AttributeValue: Attribute value used to refine the results e.g. - // 'drama'. - AttributeValue string `json:"attributeValue,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttributeKey") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "AnonymousWidgetConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeKey") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AnonymousWidgetConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute +func (s *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo: -// Information describing query expansion including whether expansion -// has occurred. -type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { - // ExpandedQuery: Bool describing whether query expansion has occurred. - ExpandedQuery bool `json:"expandedQuery,omitempty"` +// GoogleCloudDiscoveryengineV1alphaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1alphaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if + // applicable. For example, if the end user has finished 90 seconds of a + // playback video, then MediaInfo.media_progress_duration.seconds should + // be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` - // PinnedResultCount: Number of pinned results. This field will only be - // set when expansion happens and - // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to - // true. - PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` + // MediaProgressPercentage: Media progress should be computed using only + // the media_progress_duration relative to the media total length. This + // value must be between `[0, 1.0]` inclusive. If this is not a playback + // or the progress cannot be computed (e.g. ongoing livestream), this + // field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to + // ForceSendFields is a list of field names (e.g. + // "MediaProgressDuration") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "MediaProgressDuration") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1alphaPageInfo struct { + // PageCategory: The most specific category associated with a category + // page. To represent full path of category, use '>' sign to separate + // different hierarchies. If '>' is part of the category name, please + // replace it with other character(s). Category pages include special + // pages such as sales or promotions. For instance, a special sale page + // may have the category hierarchy: "pageCategory" : "Sales > 2017 + // Black Friday Deals". Required for `view-category-page` events. Other + // event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + PageCategory string `json:"pageCategory,omitempty"` + + // PageviewId: A unique ID of a web page view. This should be kept the + // same for all user events triggered from the same pageview. For + // example, an item detail page view could trigger multiple events as + // the user is browsing the page. The `pageview_id` property should be + // kept the same for all these events so that they can be grouped + // together properly. When using the client side event reporting with + // JavaScript pixel and Google Tag Manager, this value is filled in + // automatically. + PageviewId string `json:"pageviewId,omitempty"` + + // ReferrerUri: The referrer URL of the current page. When using the + // client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` + + // Uri: Complete URL (window.location.href) of the user's current page. + // When using the client side event reporting with JavaScript pixel and + // Google Tag Manager, this value is filled in automatically. Maximum + // length 5,000 characters. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "PageCategory") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9764,7 +9064,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpandedQuery") to include + // NullFields is a list of field names (e.g. "PageCategory") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -9773,30 +9073,30 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo +func (s *GoogleCloudDiscoveryengineV1alphaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPageInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult: -// Represents the search results. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { - // Chunk: The chunk data in the search response if the - // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. - Chunk *GoogleCloudDiscoveryengineV1alphaChunk `json:"chunk,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPanelInfo: Detailed panel +// information associated with a user event. +type GoogleCloudDiscoveryengineV1alphaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` - // Document: The document data snippet in the search response. Only - // fields that are marked as retrievable are populated. - Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` - // Id: Document.id of the searched Document. - Id string `json:"id,omitempty"` + // PanelPosition: The ordered position of the panel, if shown to the + // user with other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` - // ModelScores: Google provided available scores. - ModelScores map[string]GoogleCloudDiscoveryengineV1alphaDoubleList `json:"modelScores,omitempty"` + // TotalPanels: The total number of panels, including this one, shown to + // the user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` - // ForceSendFields is a list of field names (e.g. "Chunk") to + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9804,59 +9104,42 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Chunk") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult +func (s *GoogleCloudDiscoveryengineV1alphaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPanelInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of -// the top N search result specified by the summary spec. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { - // SafetyAttributes: A collection of Safety Attribute categories and - // their associated confidence scores. - SafetyAttributes *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` - - // SummarySkippedReasons: Additional summary-skipped reasons. This - // provides the reason for ignored cases. If nothing is skipped, this - // field is not set. - // - // Possible values: - // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary - // skipped reason is not specified. - // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. - // Only populated when SummarySpec.ignore_adversarial_query is set to - // `true`. - // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only populated when - // SummarySpec.ignore_non_summary_seeking_query is set to `true`. - // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored - // case. Google skips the summary if there are no high-relevance search - // results. For example, the data store contains facts about company A - // but the user query is asking questions about company B. - // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. - // Google skips the summary if there is a potential policy violation - // detected. This includes content that may be violent or toxic. - // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google - // skips the summary if the LLM addon is not enabled. - SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPauseEngineRequest: Request for +// pausing training of an engine. +type GoogleCloudDiscoveryengineV1alphaPauseEngineRequest struct { +} - // SummaryText: The summary content. - SummaryText string `json:"summaryText,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPrincipal: Principal identifier of a +// user or a group. +type GoogleCloudDiscoveryengineV1alphaPrincipal struct { + // GroupId: Group identifier. For Google Workspace user account, + // group_id should be the google workspace group email. For non-google + // identity provider user account, group_id is the mapped group + // identifier configured during the workforcepool config. + GroupId string `json:"groupId,omitempty"` - // SummaryWithMetadata: Summary with metadata information. - SummaryWithMetadata *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` + // UserId: User identifier. For Google Workspace user account, user_id + // should be the google workspace user email. For non-google identity + // provider user account, user_id is the mapped user identifier + // configured during the workforcepool config. + UserId string `json:"userId,omitempty"` - // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // ForceSendFields is a list of field names (e.g. "GroupId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9864,36 +9147,38 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SafetyAttributes") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "GroupId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummary +func (s *GoogleCloudDiscoveryengineV1alphaPrincipal) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPrincipal raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation: -// Citation info for a segment. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation struct { - // EndIndex: End of the attributed segment, exclusive. - EndIndex int64 `json:"endIndex,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaProcessedDocument: Document captures +// all raw metadata information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1alphaProcessedDocument struct { + // Document: Required. Full resource name of the referenced document, in + // the format + // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document + // s/*`. + Document string `json:"document,omitempty"` - // Sources: Citation sources for the attributed segment. - Sources []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource `json:"sources,omitempty"` + // JsonData: The JSON string representation of the processed document. + JsonData string `json:"jsonData,omitempty"` - // StartIndex: Index indicates the start of the segment, measured in - // bytes/unicode. - StartIndex int64 `json:"startIndex,omitempty,string"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9901,7 +9186,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9910,19 +9195,35 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation +func (s *GoogleCloudDiscoveryengineV1alphaProcessedDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaProcessedDocument raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata -// : Citation metadata. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata struct { - // Citations: Citations for segments. - Citations []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation `json:"citations,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata: Metadata +// related to the progress of the PurgeDocuments operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "Citations") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9930,7 +9231,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Citations") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9939,21 +9240,32 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource: -// Citation source. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource struct { - // ReferenceIndex: Document reference index from - // SummaryWithMetadata.references. It is 0-indexed and the value will be - // zero if the reference_index is not set explicitly. - ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest: Request +// message for DocumentService.PurgeDocuments method. +type GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest struct { + // ErrorConfig: The desired location of errors incurred during the + // purge. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to + // 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"` + + // GcsSource: Cloud Storage location for the input content. Supported + // `data_schema`: * `document_id`: One valid Document.id per line. + GcsSource *GoogleCloudDiscoveryengineV1alphaGcsSource `json:"gcsSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9961,42 +9273,36 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReferenceIndex") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference: -// Document reference. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference struct { - // ChunkContents: List of cited chunk contents derived from document - // content. - ChunkContents []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` - - // Document: Required. Document.name of the document. Full resource name - // of the referenced document, in the format - // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document - // s/*`. - Document string `json:"document,omitempty"` - - // Title: Title of the document. - Title string `json:"title,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse: 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 GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse struct { + // PurgeCount: The total count of documents purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // Uri: Cloud Storage or HTTP uri for the document. - Uri string `json:"uri,omitempty"` + // 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. "ChunkContents") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10004,31 +9310,31 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkContents") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference +func (s *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkCo -// ntent: Chunk content. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent struct { - // Content: Chunk textual content. - Content string `json:"content,omitempty"` - - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig: Configuration of +// destination for Purge related errors. +type GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for purge errors. This must be an + // empty, existing Cloud Storage directory. Purge errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10036,7 +9342,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "GcsPrefix") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10045,24 +9351,25 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent +func (s *GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeErrorConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes -// : Safety Attribute categories and their associated confidence scores. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes struct { - // Categories: The display names of Safety Attribute categories - // associated with the generated content. Order matches the Scores. - Categories []string `json:"categories,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadat +// a: Metadata related to the progress of the +// PurgeSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Scores: The confidence scores of the each category, higher value - // means higher confidence. Order matches the Categories. - Scores []float64 `json:"scores,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. "Categories") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10070,7 +9377,7 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Categories") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10079,42 +9386,30 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes +func (s *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes - 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 +// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest +// : Request message for +// CompletionService.PurgeSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest struct { } -// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetad -// ata: Summary with metadata information. -type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata struct { - // CitationMetadata: Citation metadata for given summary. - CitationMetadata *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` - - // References: Document References. - References []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference `json:"references,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRespons +// e: Response message for +// CompletionService.PurgeSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // Summary: Summary text with no citation information. - Summary string `json:"summary,omitempty"` + // PurgeCount: Number of suggestion deny list entries purged. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10122,167 +9417,120 @@ type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitationMetadata") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata +func (s *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaServingConfig: Configures metadata -// that is used to generate serving time results (e.g. search results or -// recommendation predictions). The ServingConfig is passed in the -// search and predict request and generates results. -type GoogleCloudDiscoveryengineV1alphaServingConfig struct { - // BoostControlIds: Boost controls to use in serving path. All triggered - // boost controls will be applied. Boost controls must be in the same - // data store as the serving config. Maximum of 20 boost controls. - BoostControlIds []string `json:"boostControlIds,omitempty"` - - // CreateTime: Output only. ServingConfig created timestamp. +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata: Metadata +// related to the progress of the PurgeUserEvents operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata struct { + // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // CustomFineTuningSpec: Custom fine tuning configs. - CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // DisplayName: Required. The human readable serving config display - // name. Used in Discovery UI. This field must be a UTF-8 encoded string - // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT - // error is returned. - DisplayName string `json:"displayName,omitempty"` + // SuccessCount: Count of entries that were deleted successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // DissociateControlIds: Condition do not associate specifications. If - // multiple do not associate conditions match, all matching do not - // associate controls in the list will execute. Order does not matter. - // Maximum number of specifications is 100. Can only be set if - // SolutionType is SOLUTION_TYPE_SEARCH. - DissociateControlIds []string `json:"dissociateControlIds,omitempty"` - - // DiversityLevel: How much diversity to use in recommendation model - // results e.g. `medium-diversity` or `high-diversity`. Currently - // supported values: * `no-diversity` * `low-diversity` * - // `medium-diversity` * `high-diversity` * `auto-diversity` If not - // specified, we choose default based on recommendation model type. - // Default value: `no-diversity`. Can only be set if SolutionType is - // SOLUTION_TYPE_RECOMMENDATION. - DiversityLevel string `json:"diversityLevel,omitempty"` - - // EmbeddingConfig: Bring your own embedding config. The config is used - // for search semantic retrieval. The retrieval is based on the dot - // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the - // document embeddings that are provided by this EmbeddingConfig. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it - // overrides this ServingConfig.embedding_config. - EmbeddingConfig *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig `json:"embeddingConfig,omitempty"` - - // FilterControlIds: Filter controls to use in serving path. All - // triggered filter controls will be applied. Filter controls must be in - // the same data store as the serving config. Maximum of 20 filter - // controls. - FilterControlIds []string `json:"filterControlIds,omitempty"` - - // GenericConfig: The GenericConfig of the serving configuration. - GenericConfig *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig `json:"genericConfig,omitempty"` - - // GuidedSearchSpec: Guided search configs. - GuidedSearchSpec *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec `json:"guidedSearchSpec,omitempty"` - - // IgnoreControlIds: Condition ignore specifications. If multiple ignore - // conditions match, all matching ignore controls in the list will - // execute. Order does not matter. Maximum number of specifications is - // 100. - IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` - - // MediaConfig: The MediaConfig of the serving configuration. - MediaConfig *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig `json:"mediaConfig,omitempty"` - - // ModelId: The id of the model to use at serving time. Currently only - // RecommendationModels are supported. Can be changed but only to a - // compatible model (e.g. others-you-may-like CTR to others-you-may-like - // CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. - ModelId string `json:"modelId,omitempty"` + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/{location}/collections/{collection_id}/e - // ngines/{engine_id}/servingConfigs/{serving_config_id}` - Name string `json:"name,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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // OnewaySynonymsControlIds: Condition oneway synonyms specifications. - // If multiple oneway synonyms conditions match, all matching oneway - // synonyms controls in the list will execute. Maximum number of - // specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // RankingExpression: The ranking expression controls the customized - // ranking on retrieval documents. To leverage this, document embedding - // is required. The ranking expression setting in ServingConfig applies - // to all search requests served by the serving config. However, if - // SearchRequest.ranking_expression is specified, it overrides the - // ServingConfig ranking expression. The ranking expression is a single - // function or multiple functions that are joined by "+". * - // ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: relevance_score: - // pre-defined keywords, used for measure relevance between query and - // document. embedding_field_path: the document embedding field used - // with query embedding vector. dotProduct: embedding function between - // embedding_field_path and query embedding vector. Example ranking - // expression: If document has an embedding field doc_embedding, the - // ranking expression could be 0.5 * relevance_score + 0.3 * - // dotProduct(doc_embedding). - RankingExpression string `json:"rankingExpression,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // RedirectControlIds: IDs of the redirect controls. Only the first - // triggered redirect action is applied, even if multiple apply. Maximum - // number of specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - RedirectControlIds []string `json:"redirectControlIds,omitempty"` +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest: Request +// message for PurgeUserEvents method. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest struct { + // Filter: Required. The filter string to specify the events to be + // deleted with a length limit of 5,000 characters. The eligible fields + // for filtering are: * `eventType`: Double quoted UserEvent.event_type + // string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: + // Double quoted string. Specifying this will delete all events + // associated with a visitor. * `userId`: Double quoted string. + // Specifying this will delete all events associated with a user. + // Examples: * Deleting all events in a time range: `eventTime > + // "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z" * + // Deleting specific eventType: `eventType = "search" * Deleting all + // events for a specific visitor: `userPseudoId = "visitor1024" * + // Deleting all events inside a DataStore: `*` The filtering fields are + // assumed to have an implicit AND. + Filter string `json:"filter,omitempty"` - // ReplacementControlIds: Condition replacement specifications. Applied - // according to the order in the list. A previously replaced term can - // not be re-replaced. Maximum number of specifications is 100. Can only - // be set if SolutionType is SOLUTION_TYPE_SEARCH. - ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + // Force: The `force` field is currently not supported. Purge user event + // requests will permanently delete all purgeable events. Once the + // development is complete: If `force` is set to false, the method will + // return the expected purge count without deleting any user events. + // This field will default to false if not included in the request. + Force bool `json:"force,omitempty"` - // SolutionType: Required. Immutable. Specifies the solution type that a - // serving config can be associated with. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionType string `json:"solutionType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Filter") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // SynonymsControlIds: Condition synonyms specifications. If multiple - // synonyms conditions match, all matching synonyms controls in the list - // will execute. Maximum number of specifications is 100. Can only be - // set if SolutionType is SOLUTION_TYPE_SEARCH. - SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // UpdateTime: Output only. ServingConfig updated timestamp. - UpdateTime string `json:"updateTime,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse: Response of +// the PurgeUserEventsRequest. If the long running operation is +// successfully done, then this message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse struct { + // PurgeCount: The total count of events purged as a result of the + // operation. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "BoostControlIds") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10290,92 +9538,79 @@ type GoogleCloudDiscoveryengineV1alphaServingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostControlIds") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaServingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfig +func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig: -// Specifies the configurations needed for Generic Discovery.Currently -// we support: * `content_search_spec`: configuration for generic -// content search. -type GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig struct { - // ContentSearchSpec: Specifies the expected behavior of content search. - // Only valid for content-search enabled data store. - ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` +// GoogleCloudDiscoveryengineV1alphaQuery: Defines a user inputed query. +type GoogleCloudDiscoveryengineV1alphaQuery struct { + // QueryId: Unique Id for the query. + QueryId string `json:"queryId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") - // to unconditionally include in API requests. By default, fields with + // Text: Plain text. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryId") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentSearchSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "QueryId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig +func (s *GoogleCloudDiscoveryengineV1alphaQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig: Specifies -// the configurations needed for Media Discovery. Currently we support: -// * `demote_content_watched`: Threshold for watched content demotion. -// Customers can specify if using watched content demotion or use viewed -// detail page. Using the content watched demotion, customers need to -// specify the watched minutes or percentage exceeds the threshold, the -// content will be demoted in the recommendation result. * -// `promote_fresh_content`: cutoff days for fresh content promotion. -// Customers can specify if using content freshness promotion. If the -// content was published within the cutoff days, the content will be -// promoted in the recommendation result. Can only be set if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -type GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig struct { - // ContentFreshnessCutoffDays: Specifies the content freshness used for - // recommendation result. Contents will be demoted if contents were - // published for more than content freshness cutoff days. - ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRankRequest: Request message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1alphaRankRequest struct { + // IgnoreRecordDetailsInResponse: If true, the response will contain + // only record ID and score. By default, it is false, the response will + // contain record details. + IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` - // ContentWatchedPercentageThreshold: Specifies the content watched - // percentage threshold for demotion. Threshold value must be between - // [0, 1.0] inclusive. - ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + // Model: The identifier of the model to use. It is one of: * + // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn + // input token size 512. It is set to `semantic-ranker-512@latest` by + // default if unspecified. + Model string `json:"model,omitempty"` - // ContentWatchedSecondsThreshold: Specifies the content watched minutes - // threshold for demotion. - ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + // Query: The query to use. + Query string `json:"query,omitempty"` - // DemotionEventType: Specifies the event type used for demoting - // recommendation result. Currently supported values: * `view-item`: - // Item viewed. * `media-play`: Start/resume watching a video, playing a - // song, etc. * `media-complete`: Finished or stopped midway through a - // video, song, etc. If unset, watch history demotion will not be - // applied. Content freshness demotion will still be applied. - DemotionEventType string `json:"demotionEventType,omitempty"` + // Records: Required. A list of records to rank. At most 100 records to + // rank. + Records []*GoogleCloudDiscoveryengineV1alphaRankingRecord `json:"records,omitempty"` + + // TopN: The number of results to return. If this is unset or no bigger + // than zero, returns all results. + TopN int64 `json:"topN,omitempty"` // ForceSendFields is a list of field names (e.g. - // "ContentFreshnessCutoffDays") to unconditionally include in API + // "IgnoreRecordDetailsInResponse") to unconditionally include in API // requests. By default, fields with empty or default values are omitted // from API requests. However, any non-pointer, non-interface field // appearing in ForceSendFields will be sent to the server regardless of @@ -10384,7 +9619,7 @@ type GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig struct { ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "ContentFreshnessCutoffDays") to include in API requests with the + // "IgnoreRecordDetailsInResponse") to include in API requests with the // JSON null value. By default, fields with empty values are omitted // from API requests. However, any field with an empty value appearing // in NullFields will be sent to the server as null. It is an error if a @@ -10393,41 +9628,23 @@ type GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig +func (s *GoogleCloudDiscoveryengineV1alphaRankRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRankRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig - var s1 struct { - ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` - ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) - s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) - return nil -} - -// GoogleCloudDiscoveryengineV1alphaSiteSearchEngine: SiteSearchEngine -// captures DataStore level site search persisting configurations. It is -// a singleton value per data store. -type GoogleCloudDiscoveryengineV1alphaSiteSearchEngine struct { - // Name: The fully qualified resource name of the site search engine. - // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRankResponse: Response message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1alphaRankResponse struct { + // Records: A list of records sorted by descending score. + Records []*GoogleCloudDiscoveryengineV1alphaRankingRecord `json:"records,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Name") to + // ForceSendFields is a list of field names (e.g. "Records") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10435,8 +9652,8 @@ type GoogleCloudDiscoveryengineV1alphaSiteSearchEngine struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Records") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10444,79 +9661,152 @@ type GoogleCloudDiscoveryengineV1alphaSiteSearchEngine struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSiteSearchEngine +func (s *GoogleCloudDiscoveryengineV1alphaRankResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRankResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the - // ownership and validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification - // failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website - // that opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRankingRecord: Record message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1alphaRankingRecord struct { + // Content: The content of the record. Empty by default. At least one of + // title or content should be set otherwise an INVALID_ARGUMENT error is + // thrown. + Content string `json:"content,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` + // Id: The unique ID to represent the record. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "SiteVerificationState") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // Score: The score of this record based on the given query and selected + // model. + Score float64 `json:"score,omitempty"` + + // Title: The title of the record. Empty by default. At least one of + // title or content should be set otherwise an INVALID_ARGUMENT error is + // thrown. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo +func (s *GoogleCloudDiscoveryengineV1alphaRankingRecord) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRankingRecord raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSpannerSource: The Spanner source -// for importing data -type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { - // DatabaseId: Required. The database ID of the source Spanner table. - DatabaseId string `json:"databaseId,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaRankingRecord) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaRankingRecord + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} - // EnableDataBoost: Optional. Whether to apply data boost on Spanner - // export. Enabling this option will incur additional cost. More info: - // https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas - EnableDataBoost bool `json:"enableDataBoost,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecommendRequest: Request message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length + // limit of 5,000 characters. Currently, only filter expressions on the + // `filter_tags` attribute is supported. Examples: * `(filter_tags: + // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * + // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: + // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the + // `params` field, then attribute-based expressions are expected instead + // of the above described tag-based syntax. Examples: * (launguage: + // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: + // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly + // matching the filters, set `strictFiltering` to True in + // RecommendRequest.params to receive empty results instead. Note that + // the API will never return Documents with `storageStatus` of `EXPIRED` + // or `DELETED` regardless of filter choices. + Filter string `json:"filter,omitempty"` - // InstanceId: Required. The instance ID of the source Spanner table. - InstanceId string `json:"instanceId,omitempty"` + // PageSize: Maximum number of results to return. Set this property to + // the number of recommendation results needed. If zero, the service + // will choose a reasonable default. The maximum allowed value is 100. + // Values above 100 will be coerced to 100. + PageSize int64 `json:"pageSize,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length - // limit of 128 characters. If not specified, inherits the project ID - // from the parent request. - ProjectId string `json:"projectId,omitempty"` + // Params: Additional domain specific parameters for the + // recommendations. Allowed values: * `returnDocument`: Boolean. If set + // to true, the associated Document object will be returned in + // RecommendResponse.RecommendationResult.document. * `returnScore`: + // Boolean. If set to true, the recommendation 'score' corresponding to + // each returned Document will be set in + // RecommendResponse.RecommendationResult.metadata. The given 'score' + // indicates the probability of a Document conversion given the user's + // context and history. * `strictFiltering`: Boolean. True by default. + // If set to false, the service will return generic (unfiltered) popular + // Documents instead of empty if your filter blocks all recommendation + // results. * `diversityLevel`: String. Default empty. If set to be + // non-empty, then it needs to be one of: * `no-diversity` * + // `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` This gives request-level control and adjusts + // recommendation results based on Document category. * + // `attributeFilteringSyntax`: Boolean. False by default. If set to + // true, the `filter` field is interpreted according to the new, + // attribute-based syntax. + Params googleapi.RawMessage `json:"params,omitempty"` - // TableId: Required. The table name of the Spanner database that needs - // to be imported. - TableId string `json:"tableId,omitempty"` + // UserEvent: Required. Context about the user, what they are looking at + // and what action they took to trigger the Recommend request. Note that + // this user event detail won't be ingested to userEvent logs. Thus, a + // separate userEvent write request is required for event logging. Don't + // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can + // negatively impact model performance), instead set + // UserEvent.user_pseudo_id to a random unique ID and leave + // UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1alphaUserEvent `json:"userEvent,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseId") to + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Requirements for + // labels + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ValidateOnly: Use validate only mode for this recommendation query. + // If set to true, a fake model will be used that returns arbitrary + // Document IDs. Note that the validate only mode should only be used + // for testing the API, or if the model is not ready. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10524,8 +9814,8 @@ type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10533,33 +9823,36 @@ type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSpannerSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSpannerSource +func (s *GoogleCloudDiscoveryengineV1alphaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry: Suggestion -// deny list entry identifying the phrase to block from suggestions and -// the applied operation for the phrase. -type GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry struct { - // BlockPhrase: Required. Phrase to block from suggestions served. Can - // be maximum 125 characters. - BlockPhrase string `json:"blockPhrase,omitempty"` - - // MatchOperator: Required. The match operator to apply for this phrase. - // Whether to block the exact phrase, or block any suggestions - // containing this phrase. - // - // Possible values: - // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used - // "EXACT_MATCH" - If the suggestion is an exact match to the - // block_phrase, then block it. - // "CONTAINS" - If the suggestion contains the block_phrase, then - // block it. - MatchOperator string `json:"matchOperator,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecommendResponse: Response message +// for Recommend method. +type GoogleCloudDiscoveryengineV1alphaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included + // in the UserEvent logs resulting from this recommendation, which + // enables accurate attribution of recommendation model performance. + AttributionToken string `json:"attributionToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockPhrase") to + // MissingIds: IDs of documents in the request that were missing from + // the default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` + + // Results: A list of recommended Documents. The order represents the + // ranking (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult `json:"results,omitempty"` + + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttributionToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10567,87 +9860,93 @@ type GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockPhrase") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AttributionToken") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry +func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1alphaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated - // to include all pages whose address contains the provided_uri_pattern. - // If set to true, an uri_pattern is generated to try to be an exact - // match of the provided_uri_pattern or just the specific page if the - // provided_uri_pattern is a specific one. provided_uri_pattern is - // always normalized to generate the URI pattern to be used by the - // search engine. - ExactMatch bool `json:"exactMatch,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult +// : RecommendationResult represents a generic recommendation result +// with associated metadata. +type GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in + // RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` - // GeneratedUriPattern: Output only. This is system-generated based on - // the provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + // Metadata: Additional Document metadata / annotations. Possible + // values: * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be - // picked up by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to - // be deleted. This is a transitioning state which will resulted in - // either: 1. target site deleted if unindexing is successful; 2. state - // reverts to SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Name: Output only. The fully qualified resource name of the target - // site. - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` + // NullFields is a list of field names (e.g. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // ProvidedUriPattern: Required. Input only. The user provided URI - // pattern from which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecommendResponseRecommendationResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // SiteVerificationInfo: Output only. Site ownership and validity - // verification status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata: Metadata +// related to the progress of the SiteSearchEngineService.RecrawlUris +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be - // included or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server - // behavior defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` + // InvalidUris: Unique URIs in the request that don't match any + // TargetSite in the DataStore, only match TargetSites that haven't been + // fully indexed, or match a TargetSite with type EXCLUDE. + InvalidUris []string `json:"invalidUris,omitempty"` - // UpdateTime: Output only. The target site's last updated time. + // PendingCount: Total number of URIs that have yet to be crawled. + PendingCount int64 `json:"pendingCount,omitempty"` + + // QuotaExceededCount: Total number of URIs that were rejected due to + // insufficient indexing resources. + QuotaExceededCount int64 `json:"quotaExceededCount,omitempty"` + + // SuccessCount: Total number of URIs that have been crawled so far. + SuccessCount int64 `json:"successCount,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ValidUrisCount: Total number of unique URIs in the request that are + // not in invalid_uris. + ValidUrisCount int64 `json:"validUrisCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10655,7 +9954,7 @@ type GoogleCloudDiscoveryengineV1alphaTargetSite struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10664,19 +9963,21 @@ type GoogleCloudDiscoveryengineV1alphaTargetSite struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest: Request message +// for SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest struct { + // Uris: Required. List of URIs to crawl. At most 10K URIs are + // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI + // should match at least one TargetSite in `site_search_engine`. + Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // ForceSendFields is a list of field names (e.g. "Uris") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10684,61 +9985,65 @@ type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Uris") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: -// Failed due to insufficient quota. -type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total - // quota this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse: Response +// message for SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse struct { + // FailedUris: URIs that were not crawled before the LRO terminated. + FailedUris []string `json:"failedUris,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") - // to unconditionally include in API requests. By default, fields with + // FailureSamples: Details for a sample of up to 10 `failed_uris`. + FailureSamples []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo `json:"failureSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FailedUris") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "FailedUris") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTextInput: Defines text input. -type GoogleCloudDiscoveryengineV1alphaTextInput struct { - // Context: Conversation context of the input. - Context *GoogleCloudDiscoveryengineV1alphaConversationContext `json:"context,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo: +// Details about why a particular URI failed to be crawled. Each +// FailureInfo contains one FailureReason per CorpusType. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo struct { + // FailureReasons: List of failure reasons by corpus type (e.g. desktop, + // mobile). + FailureReasons []*GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason `json:"failureReasons,omitempty"` - // Input: Text input. - Input string `json:"input,omitempty"` + // Uri: URI that failed to be crawled. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "Context") to + // ForceSendFields is a list of field names (e.g. "FailureReasons") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10746,33 +10051,41 @@ type GoogleCloudDiscoveryengineV1alphaTextInput struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Context") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FailureReasons") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTextInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTextInput +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata -// related to the progress of the TrainCustomModel operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailure +// Reason: Details about why crawling failed for a particular +// CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different +// reasons. +type GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason struct { + // CorpusType: DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. + // + // Possible values: + // "CORPUS_TYPE_UNSPECIFIED" - Default value. + // "DESKTOP" - Denotes a crawling attempt for the desktop version of a + // page. + // "MOBILE" - Denotes a crawling attempt for the mobile version of a + // page. + CorpusType string `json:"corpusType,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // ErrorMessage: Reason why the URI was not crawled. + ErrorMessage string `json:"errorMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "CorpusType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10780,7 +10093,7 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "CorpusType") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10789,28 +10102,25 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata +func (s *GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest: Request -// message for SearchTuningService.TrainCustomModel method. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest struct { - // ErrorConfig: The desired location of errors incurred during the data - // ingestion and training. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaReply: Defines a reply message to +// user. +type GoogleCloudDiscoveryengineV1alphaReply struct { + // References: References in the reply. + References []*GoogleCloudDiscoveryengineV1alphaReplyReference `json:"references,omitempty"` - // GcsTrainingInput: Cloud Storage training input. - GcsTrainingInput *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` + // Reply: DEPRECATED: use `summary` instead. Text reply. + Reply string `json:"reply,omitempty"` - // ModelType: Model to be trained. Supported values are: * - // **search-tuning**: Fine tuning the search system based on data - // provided. - ModelType string `json:"modelType,omitempty"` + // Summary: Summary based on search results. + Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "References") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10818,52 +10128,37 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "References") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest +func (s *GoogleCloudDiscoveryengineV1alphaReply) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaReply raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInp -// ut: Cloud Storage training data input. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput struct { - // CorpusDataPath: The Cloud Storage corpus data which could be - // associated in train data. The data path format is `gs:///`. A newline - // delimited jsonl/ndjson file. For search-tuning model, each line - // should have the _id, title and text. Example: `{"_id": "doc1", title: - // "relevant doc", "text": "relevant text"}` - CorpusDataPath string `json:"corpusDataPath,omitempty"` +// GoogleCloudDiscoveryengineV1alphaReplyReference: Defines reference in +// reply. +type GoogleCloudDiscoveryengineV1alphaReplyReference struct { + // AnchorText: Anchor text. + AnchorText string `json:"anchorText,omitempty"` - // QueryDataPath: The gcs query data which could be associated in train - // data. The data path format is `gs:///`. A newline delimited - // jsonl/ndjson file. For search-tuning model, each line should have the - // _id and text. Example: {"_id": "query1", "text": "example query"} - QueryDataPath string `json:"queryDataPath,omitempty"` + // End: Anchor text end index. + End int64 `json:"end,omitempty"` - // TestDataPath: Cloud Storage test data. Same format as - // train_data_path. If not provided, a random 80/20 train/test split - // will be performed on train_data_path. - TestDataPath string `json:"testDataPath,omitempty"` + // Start: Anchor text start index. + Start int64 `json:"start,omitempty"` - // TrainDataPath: Cloud Storage training data path whose format should - // be `gs:///`. The file should be in tsv format. Each line should have - // the doc_id and query_id and score (number). For search-tuning model, - // it should have the query-id corpus-id score as tsv file header. The - // score should be a number in `[0, inf+)`. The larger the number is, - // the more relevant the pair is. Example: * - // `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` - TrainDataPath string `json:"trainDataPath,omitempty"` + // Uri: URI link reference. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorpusDataPath") to + // ForceSendFields is a list of field names (e.g. "AnchorText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10871,45 +10166,50 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorpusDataPath") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AnchorText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput +func (s *GoogleCloudDiscoveryengineV1alphaReplyReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaReplyReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response -// of the TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaResumeEngineRequest: Request for +// resuming training of an engine. +type GoogleCloudDiscoveryengineV1alphaResumeEngineRequest struct { +} - // ErrorSamples: A sample of errors encountered while processing the - // data. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1alphaSchema struct { + // FieldConfigs: Output only. Configurations for fields of the schema. + FieldConfigs []*GoogleCloudDiscoveryengineV1alphaFieldConfig `json:"fieldConfigs,omitempty"` - // Metrics: The metrics of the trained model. - Metrics map[string]float64 `json:"metrics,omitempty"` + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` - // ModelStatus: The trained model status. Possible values are: * - // **bad-data**: The training data quality is bad. * **no-improvement**: - // Tuning didn't improve performance. Won't deploy. * **in-progress**: - // Model training is in progress. * **ready**: The model is ready for - // serving. - ModelStatus string `json:"modelStatus,omitempty"` + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "FieldConfigs") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10917,7 +10217,7 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include + // NullFields is a list of field names (e.g. "FieldConfigs") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -10926,47 +10226,40 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse +func (s *GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSchema raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTransactionInfo: A transaction -// represents the entire purchase transaction. -type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { - // Cost: All the costs associated with the products. These can be - // manufacturing costs, shipping expenses not borne by the end user, or - // any other costs, such that: * Profit = value - tax - cost - Cost float64 `json:"cost,omitempty"` - - // Currency: Required. Currency code. Use three-character ISO-4217 code. - Currency string `json:"currency,omitempty"` - - // DiscountValue: The total discount(s) value applied to this - // transaction. This figure should be excluded from - // TransactionInfo.value For example, if a user paid - // TransactionInfo.value amount, then nominal (pre-discount) value of - // the transaction is the sum of TransactionInfo.value and - // TransactionInfo.discount_value This means that profit is calculated - // the same way, regardless of the discount value, and that - // TransactionInfo.discount_value can be larger than - // TransactionInfo.value: * Profit = value - tax - cost - DiscountValue float64 `json:"discountValue,omitempty"` - - // Tax: All the taxes associated with the transaction. - Tax float64 `json:"tax,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchInfo: Detailed search +// information. +type GoogleCloudDiscoveryengineV1alphaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination + // (the 0-indexed starting location, amongst the products deemed by the + // API as relevant). See SearchRequest.offset for definition. If this + // field is negative, an `INVALID_ARGUMENT` is returned. This can only + // be set for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + Offset int64 `json:"offset,omitempty"` - // TransactionId: The transaction ID with a length limit of 128 - // characters. - TransactionId string `json:"transactionId,omitempty"` + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a + // UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + OrderBy string `json:"orderBy,omitempty"` - // Value: Required. Total non-zero value associated with the - // transaction. This value may include shipping, tax, or other - // adjustments to the total value that you want to include. - Value float64 `json:"value,omitempty"` + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length + // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is + // returned. At least one of search_query or PageInfo.page_category is + // required for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + SearchQuery string `json:"searchQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cost") to + // ForceSendFields is a list of field names (e.g. "Offset") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10974,7 +10267,7 @@ type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cost") to include in API + // NullFields is a list of field names (e.g. "Offset") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10983,42 +10276,194 @@ type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo +func (s *GoogleCloudDiscoveryengineV1alphaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo - var s1 struct { - Cost gensupport.JSONFloat64 `json:"cost"` - DiscountValue gensupport.JSONFloat64 `json:"discountValue"` - Tax gensupport.JSONFloat64 `json:"tax"` - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Cost = float64(s1.Cost) - s.DiscountValue = float64(s1.DiscountValue) - s.Tax = float64(s1.Tax) - s.Value = float64(s1.Value) - return nil -} +// GoogleCloudDiscoveryengineV1alphaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1alphaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` -// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata -// associated with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune - // applies to. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion_id}/engines/{engine_id}` - Engine string `json:"engine,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/branches/0`. Use `default_branch` as the branch + // ID or leave this field empty, to search documents under the default + // branch. + Branch string `json:"branch,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engine") to + // CanonicalFilter: The default filter that is applied when a user + // performs a search without checking any filters on the search page. + // The filter applied to every search request when quality improvement + // such as query expansion is needed. In the case a query does not have + // a sufficient amount of results this filter will be used to determine + // whether or not to enable the query expansion flow. The original + // filter will still be used for the query expanded search. This field + // is strongly recommended to achieve high search quality. For more + // information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` + + // ContentSearchSpec: A specification for configuring the behavior of + // content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // CustomFineTuningSpec: Custom fine tuning configs. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + + // DataStoreSpecs: A list of data store specs to apply on a search call. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not + // provided, it will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + + // FacetSpecs: Facet specifications for faceted search. If empty, no + // facets are returned. A maximum of 100 values are allowed. Otherwise, + // an `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in + // Vertex AI Search is done by mapping the LHS filter key to a key + // property defined in the Vertex AI Search backend -- this mapping is + // defined by the customer in their schema. For example a media customer + // might have a field 'name' in their schema. In this case the filter + // would look like this: filter --> name:'ANY("king kong")' For more + // information about filtering including syntax and filter operators, + // see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery `json:"imageQuery,omitempty"` + + // Offset: A 0-indexed integer that specifies the current offset (that + // is, starting result location, amongst the Documents deemed by the API + // as relevant) in search results. This field is only considered if + // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` + // is returned. + Offset int64 `json:"offset,omitempty"` + + // OrderBy: The order in which documents are returned. Documents can be + // ordered by a field in an Document object. Leave it unset if ordered + // by relevance. `order_by` expression is case-sensitive. For more + // information on ordering, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this + // field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + + // PageSize: Maximum number of Documents to return. The maximum allowed + // value depends on the data type. Values above the maximum value are + // coerced to the maximum value. * Websites with basic indexing: Default + // `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, + // Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token received from a previous SearchService.Search + // call. Provide this to retrieve the subsequent page. When paginating, + // all other parameters provided to SearchService.Search must match the + // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + PageToken string `json:"pageToken,omitempty"` + + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. + // If set to non-empty, results are restricted or boosted based on the + // location provided. Example: user_country_code: "au" For available + // codes see Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which + // enables image searching. Example: search_type: 1 + Params googleapi.RawMessage `json:"params,omitempty"` + + // Query: Raw search query. + Query string `json:"query,omitempty"` + + // QueryExpansionSpec: The query expansion specification that specifies + // the conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + + // RankingExpression: The ranking expression controls the customized + // ranking on retrieval documents. This overrides + // ServingConfig.ranking_expression. The ranking expression is a single + // function or multiple functions that are joint by "+". * + // ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: + // `relevance_score`: pre-defined keywords, used for measure relevance + // between query and document. `embedding_field_path`: the document + // embedding field used with query embedding vector. `dotProduct`: + // embedding function between embedding_field_path and query embedding + // vector. Example ranking expression: If document has an embedding + // field doc_embedding, the ranking expression could be `0.5 * + // relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + + // SafeSearch: Whether to turn on safe search. This is only supported + // for website search. + SafeSearch bool `json:"safeSearch,omitempty"` + + // ServingConfig: Required. The resource name of the Search serving + // config, such as + // `projects/*/locations/global/collections/default_collection/engines/*/ + // servingConfigs/default_serving_config`, or + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/servingConfigs/default_serving_config`. This + // field is used to identify the serving configuration name, set of + // models used to make the search. + ServingConfig string `json:"servingConfig,omitempty"` + + // SpellCorrectionSpec: The spell correction specification that + // specifies the mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + + // UserInfo: Information about the end user. Highly recommended for + // analytics. UserInfo.user_agent is used to deduce `device_type` for + // analytics. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. This should be the same identifier as + // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11026,8 +10471,8 @@ type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engine") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -11035,69 +10480,79 @@ type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaTuneEngineRequest: Request to -// manually start a tuning process now (instead of waiting for the -// periodically scheduled tuning to happen). -type GoogleCloudDiscoveryengineV1alphaTuneEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response -// associated with a tune operation. -type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { -} - -// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec: Boost +// specification to boost certain documents. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document + // matches multiple conditions in the specifictions, boost scores from + // these specifications are all applied and combined in a non-linear + // way. Maximum number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.UpdateTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS +// pec: Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives + // the document a big promotion. However, it does not necessarily mean + // that the boosted document will be the top result at all times, nor + // that other documents will be excluded. Results could still be shown + // even when none of them matches the condition. And results that are + // significantly more relevant to the search query can still trump your + // heavily favored but irrelevant documents. Setting to -1.0 gives the + // document a big demotion. However, results that are deeply relevant + // might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. Only one of the (condition, boost) combination or the + // boost_control_spec below are set. If both are set then the global + // boost is ignored and the more fine-grained boost_control_spec is + // applied. + Boost float64 `json:"boost,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on + // customer defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // Condition: An expression which specifies a boost condition. The + // syntax and supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * + // To boost documents with document ID "doc_1" or "doc_2", and color + // "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: + // ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Boost") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11105,8 +10560,8 @@ type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -11114,164 +10569,72 @@ type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all -// metadata information Discovery Engine API needs to know about how end -// users interact with customers' website. -type GoogleCloudDiscoveryengineV1alphaUserEvent struct { - // Attributes: Extra user event features to include in the - // recommendation model. These attributes must NOT contain data that - // needs to be parsed or processed further, e.g. JSON or other - // encodings. If you provide custom attributes for ingested user events, - // also include them in the user events that you associate with - // prediction requests. Custom attribute formatting must be consistent - // between imported events and events provided with prediction requests. - // This lets the Discovery Engine API use those custom attributes when - // training models and serving predictions, which helps improve - // recommendation quality. This field needs to pass all below criteria, - // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be - // a UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendations, an example of extra user - // information is `traffic_channel`, which is how a user arrives at the - // site. Users can arrive at the site by coming to the site directly, - // coming through Google search, or in other ways. - Attributes map[string]GoogleCloudDiscoveryengineV1alphaCustomAttribute `json:"attributes,omitempty"` - - // AttributionToken: Token to attribute an API response to user - // action(s) to trigger the event. Highly recommended for user events - // that are the result of RecommendationService.Recommend. This field - // enables accurate attribution of recommendation model performance. The - // value must be one of: * RecommendResponse.attribution_token for - // events that are the result of RecommendationService.Recommend. * - // SearchResponse.attribution_token for events that are the result of - // SearchService.Search. This token enables us to accurately attribute - // page view or conversion completion back to the event and the - // particular predict response containing this clicked/purchased - // product. If user clicks on product K in the recommendation results, - // pass RecommendResponse.attribution_token as a URL parameter to - // product K's page. When recording events on product K's page, log the - // RecommendResponse.attribution_token to this field. - AttributionToken string `json:"attributionToken,omitempty"` - - // CompletionInfo: CompletionService.CompleteQuery details related to - // the event. This field should be set for `search` event when - // autocomplete function is enabled and the user clicks a suggestion for - // search. - CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` - - // DirectUserRequest: Should set to true if the request is made directly - // from the end user, in which case the UserEvent.user_info.user_agent - // can be populated from the HTTP request. This flag should be set only - // if the API request is made directly from the end user such as a - // mobile app (and not if a gateway or a server is processing and - // pushing the user events). This should not be set when using the - // JavaScript tag in UserEventService.CollectUserEvent. - DirectUserRequest bool `json:"directUserRequest,omitempty"` - - // Documents: List of Documents associated with this user event. This - // field is optional except for the following event types: * `view-item` - // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a - // `search` event, this field represents the documents returned to the - // end user on the current page (the end user may have not finished - // browsing the whole page yet). When a new page is returned to the end - // user, after pagination/filtering/ordering even for the same query, a - // new `search` event with different UserEvent.documents is desired. - Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` - - // EventTime: Only required for UserEventService.ImportUserEvents - // method. Timestamp of when the user event happened. - EventTime string `json:"eventTime,omitempty"` - - // EventType: Required. User event type. Allowed values are: Generic - // values: * `search`: Search for Documents. * `view-item`: Detailed - // page view of a Document. * `view-item-list`: View of a panel or - // ordered list of Documents. * `view-home-page`: View of the home page. - // * `view-category-page`: View of a category page, e.g. Home > Men > - // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, - // e.g. in Retail online shopping * `purchase`: Purchase an item(s) - // Media-related values: * `media-play`: Start/resume watching a video, - // playing a song, etc. * `media-complete`: Finished or stopped midway - // through a video, song, etc. - EventType string `json:"eventType,omitempty"` - - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. One example is for `search` events, the associated - // SearchRequest may contain a filter expression in SearchRequest.filter - // conforming to https://google.aip.dev/160#filtering. Similarly, for - // `view-item-list` events that are generated from a RecommendRequest, - // this field may be populated directly from RecommendRequest.filter - // conforming to https://google.aip.dev/160#filtering. The value must be - // a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Filter string `json:"filter,omitempty"` - - // MediaInfo: Media-specific info. - MediaInfo *GoogleCloudDiscoveryengineV1alphaMediaInfo `json:"mediaInfo,omitempty"` - - // PageInfo: Page metadata such as categories and other critical - // information for certain event types such as `view-category-page`. - PageInfo *GoogleCloudDiscoveryengineV1alphaPageInfo `json:"pageInfo,omitempty"` - - // Panel: Panel metadata associated with this user event. - Panel *GoogleCloudDiscoveryengineV1alphaPanelInfo `json:"panel,omitempty"` - - // PromotionIds: The promotion IDs if this is an event associated with - // promotions. Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` - - // SearchInfo: SearchService.Search details related to the event. This - // field should be set for `search` event. - SearchInfo *GoogleCloudDiscoveryengineV1alphaSearchInfo `json:"searchInfo,omitempty"` - - // SessionId: A unique identifier for tracking a visitor session with a - // length limit of 128 bytes. A session is an aggregation of an end user - // behavior in a time span. A general guideline to populate the - // session_id: 1. If user has no activity for 30 min, a new session_id - // should be assigned. 2. The session_id should be unique across users, - // suggest use uuid or add UserEvent.user_pseudo_id as prefix. - SessionId string `json:"sessionId,omitempty"` - - // TagIds: A list of identifiers for the independent experiment groups - // this user event belongs to. This is used to distinguish between user - // events associated with different experiment setups on the customer - // end. - TagIds []string `json:"tagIds,omitempty"` - - // TransactionInfo: The transaction metadata (if any) associated with - // this user event. - TransactionInfo *GoogleCloudDiscoveryengineV1alphaTransactionInfo `json:"transactionInfo,omitempty"` - - // UserInfo: Information about the end user. - UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} - // UserPseudoId: Required. A unique identifier for tracking visitors. - // For example, this could be implemented with an HTTP cookie, which - // should be able to uniquely identify a visitor on a single device. - // This unique identifier should not change if the visitor log in/out of - // the website. Do not set the field to the same fixed ID for different - // users. This mixes the event history of those users together, which - // results in degraded model quality. The field must be a UTF-8 encoded - // string with a length limit of 128 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. The field should not contain - // PII or user-data. We recommend to use Google Analytics Client ID - // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - // for this field. - UserPseudoId string `json:"userPseudoId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS +// pecBoostControlSpec: Specification for custom ranking based on +// customer specified attribute value. It provides more controls for +// customized ranking than the simple (condition, boost) combination +// above. +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: The attribute type to be used to determine the boost + // amount. The attribute value can be derived from the field value of + // the specified field_name. In the case of numerical it is + // straightforward i.e. attribute_value = numerical_field_value. In the + // case of freshness however, attribute_value = (time.now() - + // datetime_field_value). + // + // Possible values: + // "ATTRIBUTE_TYPE_UNSPECIFIED" - Unspecified AttributeType. + // "NUMERICAL" - The value of the numerical field will be used to + // dynamically update the boost amount. In this case, the + // attribute_value (the x value) of the control point will be the actual + // value of the numerical field for which the boost_amount is specified. + // "FRESHNESS" - For the freshness use case the attribute value will + // be the duration between the current time and the date in the datetime + // field specified. The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration + // value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, + // `T24H`. + AttributeType string `json:"attributeType,omitempty"` + + // ControlPoints: The control points used to define the curve. The + // monotonic function (defined through the interpolation_type above) + // passes through the control points listed here. + ControlPoints []*GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + + // FieldName: The name of the field whose value will be used to + // determine the boost amount. + FieldName string `json:"fieldName,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // InterpolationType: The interpolation type to be applied to connect + // the control points listed below. + // + // Possible values: + // "INTERPOLATION_TYPE_UNSPECIFIED" - Interpolation type is + // unspecified. In this case, it defaults to Linear. + // "LINEAR" - Piecewise linear interpolation will be applied. + InterpolationType string `json:"interpolationType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Attributes") to + // ForceSendFields is a list of field names (e.g. "AttributeType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11279,42 +10642,38 @@ type GoogleCloudDiscoveryengineV1alphaUserEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attributes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AttributeType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUserEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUserEvent +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end -// user. -type GoogleCloudDiscoveryengineV1alphaUserInfo struct { - // UserAgent: User agent as included in the HTTP header. The field must - // be a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not - // be set when using the client side event reporting with GTM or - // JavaScript tag in UserEventService.CollectUserEvent or if - // UserEvent.direct_user_request is set. - UserAgent string `json:"userAgent,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostS +// pecBoostControlSpecControlPoint: The control points used to define +// the curve. The curve defined through these control points can only be +// monotonically increasing or decreasing(constant values are +// acceptable). +type GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: Can be one of: 1. The numerical field value. 2. The + // duration spec for freshness: The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration + // value). The pattern for this is: `nDnM]`. + AttributeValue string `json:"attributeValue,omitempty"` - // UserId: Highly recommended for logged-in users. Unique identifier for - // logged-in user, such as a user name. Don't set for anonymous users. - // Always use a hashed value for this ID. Don't set the field to the - // same fixed ID for different users. This mixes the event history of - // those users together, which results in degraded model quality. The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserId string `json:"userId,omitempty"` + // BoostAmount: The value between -1 to 1 by which to boost the score if + // the attribute_value evaluates to the value specified above. + BoostAmount float64 `json:"boostAmount,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserAgent") to + // ForceSendFields is a list of field names (e.g. "AttributeValue") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11322,77 +10681,70 @@ type GoogleCloudDiscoveryengineV1alphaUserInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserAgent") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AttributeValue") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest: Request -// message for WidgetService.WidgetCompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // CompleteQueryRequest: Required. The CompleteQuery request to perform - // auto-complete suggestion query. - CompleteQueryRequest *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest `json:"completeQueryRequest,omitempty"` - - // ConfigId: Required. The UUID of the WidgetConfig. This field is used - // to identify the widget configuration, set of models used to make the - // auto complete query. - ConfigId string `json:"configId,omitempty"` - - // ForceSendFields is a list of field names (e.g. "AdditionalParams") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "AdditionalParams") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint + var s1 struct { + BoostAmount gensupport.JSONFloat64 `json:"boostAmount"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.BoostAmount = float64(s1.BoostAmount) + return nil } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search + // response. Only available if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse: -// Response message for WidgetService.WidgetCompleteQuery method. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec + // provided, there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` - // WidgetQuerySuggestions: Results of the matched query suggestions in - // widget. The result list is ordered and the first result is a top - // suggestion. - WidgetQuerySuggestions []*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion `json:"widgetQuerySuggestions,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, + // the search result mode is based on + // DataStore.DocumentProcessingConfig.chunking_config: * If + // DataStore.DocumentProcessingConfig.chunking_config is specified, it + // defaults to `CHUNKS`. * Otherwise, it defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if + // the DataStore.DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not + // included in the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "UToken") to + // SummarySpec: If `summarySpec` is not specified, summaries are not + // included in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11400,8 +10752,8 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UToken") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ChunkSpec") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -11409,19 +10761,28 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuer -// ySuggestion: Suggestions as search queries. -type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion struct { - // Suggestion: The suggestion for the query. - Suggestion string `json:"suggestion,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSp +// ec: Specifies the chunk spec to be returned from the search response. +// Only available if the +// SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no + // next chunks will be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "Suggestion") to + // NumPreviousChunks: The number of previous chunks to be returned of + // the current chunk. The maximum allowed value is 3. If not specified, + // no previous chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11429,185 +10790,115 @@ type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySugg // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Suggestion") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NumNextChunks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecChunkSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfig: WidgetConfig captures -// configs at the Widget level. -type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { - // AllowPublicAccess: Whether allow no-auth integration with widget. If - // set true, public access to search or other solutions from widget is - // allowed without authenication token provided by customer hosted - // backend server. - AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` - - // AllowlistedDomains: Allowlisted domains that can load this widget. - AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` - - // CollectionComponents: Output only. Collection components that lists - // all collections and child data stores associated with the widget - // config, those data sources can be used for filtering in widget - // service APIs, users can return results that from selected data - // sources. - CollectionComponents []*GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent `json:"collectionComponents,omitempty"` - - // ConfigId: Output only. Unique obfuscated identifier of a - // WidgetConfig. - ConfigId string `json:"configId,omitempty"` - - // ContentSearchSpec: The content search spec that configs the desired - // behavior of content search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - - // CreateTime: Output only. Timestamp the WidgetConfig was created. - CreateTime string `json:"createTime,omitempty"` - - // DataStoreType: Output only. The type of the parent data store. - // - // Possible values: - // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. - // "SITE_SEARCH" - The parent data store contains a site search - // engine. - // "STRUCTURED" - The parent data store contains a search engine for - // structured data. - // "UNSTRUCTURED" - The parent data store contains a search engine for - // unstructured data. - // "BLENDED" - The parent data store is served for blended search with - // multiple data stores. - DataStoreType string `json:"dataStoreType,omitempty"` - - // DataStoreUiConfigs: Configurable UI configurations per data store. - DataStoreUiConfigs []*GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig `json:"dataStoreUiConfigs,omitempty"` - - // DisplayName: Required. The human readable widget config display name. - // Used in Discovery UI. This field must be a UTF-8 encoded string with - // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT - // error is returned. - DisplayName string `json:"displayName,omitempty"` - - // EnableAutocomplete: Whether or not to enable autocomplete. - EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` - - // EnableConversationalSearch: Whether to allow conversational search - // (LLM, multi-turn) or not (non-LLM, single-turn). - EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` - - // EnableQualityFeedback: Turn on or off collecting the search result - // quality feedback from end users. - EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` - - // EnableResultScore: Whether to show the result score. - EnableResultScore bool `json:"enableResultScore,omitempty"` - - // EnableSafeSearch: Whether to enable safe search. - EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` - - // EnableSearchAsYouType: Whether to enable search-as-you-type behavior - // for the search widget - EnableSearchAsYouType bool `json:"enableSearchAsYouType,omitempty"` - - // EnableSnippetResultSummary: Turn on or off summary for each snippets - // result. - EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` - - // EnableSummarization: Turn on or off summarization for the search - // response. - EnableSummarization bool `json:"enableSummarization,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtract +// iveContentSpec: A specification for configuring the extractive +// content in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers + // returned in each search result. An extractive answer is a verbatim + // answer extracted from the original document, which provides a precise + // and contextually relevant answer to the search query. If the number + // of matching answers is less than the `max_extractive_answer_count`, + // return all of the answers. Otherwise, return the + // `max_extractive_answer_count`. At most five answers are returned for + // each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` - // EnableWebApp: Whether to enable standalone web app. - EnableWebApp bool `json:"enableWebApp,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments + // returned in each search result. Only applied if the DataStore is set + // to DataStore.ContentConfig.CONTENT_REQUIRED or + // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment + // is a text segment extracted from the original document that is + // relevant to the search query, and, in general, more verbose than an + // extractive answer. The segment could then be used as input for LLMs + // to generate summaries and answers. If the number of matching segments + // is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` - // FacetField: The configuration and appearance of facets in the end - // user view. - FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after + // each selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` - // FieldsUiComponentsMap: The key is the UI component. Mock. Currently - // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, - // `custom3`. The value is the name of the field along with its device - // visibility. The 3 custom fields are optional and can be added or - // removed. `title`, `thumbnail`, `url` are required UI components that - // cannot be removed. - FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent + // from each selected segments. Return at most `num_previous_segments` + // segments before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` - // IndustryVertical: Output only. The industry vertical that the - // WidgetConfig registers. The WidgetConfig industry vertical is based - // on the associated Engine. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the + // confidence score from the extractive segments in each search result. + // This feature is available only for new or allowlisted data stores. To + // allowlist your data store, please contact your Customer Engineer. The + // default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` - // LlmEnabled: Output only. Whether LLM is enabled in the corresponding - // data store. - LlmEnabled bool `json:"llmEnabled,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "MaxExtractiveAnswerCount") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // MinimumDataTermAccepted: Output only. Whether the customer accepted - // data use terms. - MinimumDataTermAccepted bool `json:"minimumDataTermAccepted,omitempty"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} - // Name: Immutable. The full resource name of the widget config. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This - // field must be a UTF-8 encoded string with a length limit of 1024 - // characters. - Name string `json:"name,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecExtractiveContentSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ResultDisplayType: The type of snippet to display in UCS widget. - - // RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new - // non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise - // search users. - // - // Possible values: - // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type - // (default to showing snippet). - // "SNIPPET" - Display results from the snippet field. - // "EXTRACTIVE_ANSWER" - Display results from extractive answers - // field. - ResultDisplayType string `json:"resultDisplayType,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippet +// Spec: A specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control + // snippet return, use `return_snippet` field. For backwards + // compatibility, we will return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` - // SolutionType: Required. Immutable. Specifies the solution type that - // this WidgetConfig can be used for. - // - // 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"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no + // affect on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` - // UpdateTime: Output only. Timestamp the WidgetConfig was updated. - UpdateTime string `json:"updateTime,omitempty"` + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also + // be returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllowPublicAccess") to + // NullFields is a list of field names (e.g. "MaxSnippetCount") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11617,80 +10908,113 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent: -// Read-only collection component that contains data store collections -// fields that may be used for filtering -type GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent struct { - // DataStoreComponents: For the data store collection, list of the - // children data stores. - DataStoreComponents []*GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent `json:"dataStoreComponents,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary +// Spec: A specification for configuring a summary returned in a search +// response. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial + // queries. The default value is `false`. Google employs search-query + // classification to detect adversarial queries. No summary is returned + // if the search query is classified as an adversarial query. For + // example, a user might ask a question regarding negative comments + // about the company or submit a query designed to generate unsafe, + // policy-violating output. If this field is set to `true`, we skip + // generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // DisplayName: The display name of the collection. - DisplayName string `json:"displayName,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries + // that are not summary-seeking. The default value is `false`. Google + // employs search-query classification to detect summary-seeking + // queries. No summary is returned if the search query is classified as + // a non-summary seeking query. For example, `why is the sky blue` and + // `Who is the best soccer player in the world?` are summary-seeking + // queries, but `SFO airport` and `world cup 2026` are not. They are + // most likely navigational queries. If this field is set to `true`, we + // skip generating summaries for non-summary seeking queries and return + // fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - // Id: Output only. the identifier of the collection, used for widget - // service. For now it refers to collection_id, in the future we will - // migrate the field to encrypted collection name UUID. - Id string `json:"id,omitempty"` + // IncludeCitations: Specifies whether to include citations in the + // summary. The default value is `false`. When this field is set to + // `true`, summaries include in-line citation numbers. Example summary + // including citations: BigQuery is Google Cloud's fully managed and + // completely serverless enterprise data warehouse [1]. BigQuery + // supports all data types, works across clouds, and has built-in + // machine learning and business intelligence, all within a unified + // platform [2, 3]. The citation numbers refer to the returned search + // results and are 1-indexed. For example, [1] means that the sentence + // is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` - // Name: The name of the collection. It should be collection resource - // name. Format: - // `projects/{project_number}/locations/{location}/collections/{collectio - // n_id}`. For APIs under WidgetService, such as LookUpWidgetConfig, the - // project number and location part is erased in this field. - Name string `json:"name,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by + // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is + // an experimental feature. + LanguageCode string `json:"languageCode,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStoreComponents") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ModelPromptSpec: If specified, the spec will be used to modify the + // prompt provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` + + // SummaryResultCount: The number of top results to generate the summary + // from. If the number of results returned is less than + // `summaryResultCount`, the summary is generated from all of the + // results. At most 10 results can be used to generate a summary. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + + // UseSemanticChunks: If true, answer will be generated from most + // relevant chunks from top search results. This feature will improve + // summary quality. Please note that with this feature enabled, not all + // top search results will be referenced and included in the reference + // list, so the citation source index only points to the search results + // listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IgnoreAdversarialQuery") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStoreComponents") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent: -// Read-only data store component that contains data stores fields that -// may be used for filtering, it's the child of `CollectionComponent`. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent struct { - // DisplayName: The display name of the data store. - DisplayName string `json:"displayName,omitempty"` - - // Id: Output only. the identifier of the data store, used for widget - // service. For now it refers to data_store_id, in the future we will - // migrate the field to encrypted data store name UUID. - Id string `json:"id,omitempty"` - - // Name: The name of the data store. It should be data store resource - // name Format: - // `projects/{project_number}/locations/{location}/collections/{collectio - // n_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such - // as LookUpWidgetConfig, the project number and location part is erased - // in this field. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary +// SpecModelPromptSpec: Specification of the prompt to use with the +// model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the + // assistant. Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11698,50 +11022,35 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Preamble") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelPromptSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig: UI -// component configuration for data store. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig struct { - // FacetField: Facet fields that store the mapping of fields to end user - // widget appearance. - FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` - - // FieldsUiComponentsMap: The key is the UI component. Mock. Currently - // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, - // `custom3`. The value is the name of the field along with its device - // visibility. The 3 custom fields are optional and can be added or - // removed. `title`, `thumbnail`, `url` are required UI components that - // cannot be removed. - FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` - - // Id: Output only. the identifier of the data store, used for widget - // service. For now it refers to data_store_id, in the future we will - // migrate the field to encrypted data store name UUID. - Id string `json:"id,omitempty"` - - // Name: The name of the data store. It should be data store resource - // name Format: - // `projects/{project_number}/locations/{location}/collections/{collectio - // n_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such - // as LookUpWidgetConfig, the project number and location part is erased - // in this field. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummary +// SpecModelSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported + // values are: * `stable`: string. Default value when no value is + // specified. Uses a generally available, fine-tuned model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "FacetField") to + // ForceSendFields is a list of field names (e.g. "Version") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11749,7 +11058,7 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FacetField") to include in + // NullFields is a list of field names (e.g. "Version") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -11758,22 +11067,21 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySpecModelSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField: Facet fields -// that store the mapping of fields to end user widget appearance. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { - // DisplayName: Optional. The field name that end users will see. - DisplayName string `json:"displayName,omitempty"` - - // Field: Required. Registered field name. The format is `field.abc`. - Field string `json:"field,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec: A struct +// to define data stores to filter on in a search call. +type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11781,42 +11089,30 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField: Facet -// field that maps to a UI Component. -type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { - // DeviceVisibility: The field visibility on different types of devices. - // - // Possible values: - // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. - // Server returns INVALID_ARGUMENT if used in requests. - // "MOBILE" - The UI component is visible on Mobile devices. - // "DESKTOP" - The UI component is visible on Browser-based client. - DeviceVisibility []string `json:"deviceVisibility,omitempty"` - - // DisplayTemplate: The template to customize how the field is - // displayed. An example value would be a string that looks like: - // "Price: {value}". - DisplayTemplate string `json:"displayTemplate,omitempty"` - - // Field: Required. Registered field name. The format is `field.abc`. - Field string `json:"field,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do +// semantic document retrieval. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to + // 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeviceVisibility") to + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11824,7 +11120,7 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeviceVisibility") to + // NullFields is a list of field names (e.g. "EmbeddingVectors") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11834,36 +11130,22 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest: -// Request message for WidgetService.WidgetConverseConversation method. -type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // ConfigId: Required. The UUID of the WidgetConfig. This field is used - // to identify the widget configuration, set of models used to make the - // user event collection. - ConfigId string `json:"configId,omitempty"` - - // ConversationId: The id of the Conversation to get. Use "-" to - // activate auto session mode, which automatically creates a new - // conversation inside a ConverseConversation session. - ConversationId string `json:"conversationId,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVe +// ctor: Embedding vector. +type GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` - // ConverseConversationRequest: Required. The - // ConverseConversationRequest request to perform converse a - // conversation. The ServingConfig id will be `default_search` by - // default. - ConverseConversationRequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest `json:"converseConversationRequest,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11871,48 +11153,102 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AdditionalParams") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "FieldPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse: -// Response message for WidgetService.WidgetConverseConversation method. -type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct { - // ConversationId: The id of the Conversation returned. - ConversationId string `json:"conversationId,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} - // ConverseConversationResponse: ConverseConversationResponse returned - // from ConversationalSearchService.ConverseConversation. - ConverseConversationResponse *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse `json:"converseConversationResponse,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If + // set to true, the position of this facet among all facets in the + // response is determined automatically. If dynamic facets are enabled, + // it is ordered together. If set to false, the position of this facet + // in the response is the same as in the request, and it is ranked + // before the facets with dynamic position enable and all dynamic + // facets. For example, you may always want to have rating facet + // returned in the response, but it's not necessarily to always display + // the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet + // in response is determined automatically. Another example, assuming + // you have the following facets in the request: * "rating", + // enable_dynamic_position = true * "price", enable_dynamic_position = + // false * "brands", enable_dynamic_position = false And also you have a + // dynamic facets enabled, which generates a facet `gender`. Then the + // final order of the facets in the response can be ("price", "brands", + // "rating", "gender") or ("price", "brands", "gender", "rating") + // depends on how API orders "gender" and "rating" facets. However, + // notice that "price" and "brands" are always ranked at first and + // second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By + // default, FacetKey.key is not excluded from the filter unless it is + // listed in this field. Listing a facet key in this field allows its + // values to appear as facet results, even when they are filtered out of + // search results. Using this field does not affect what search results + // are returned. For example, suppose there are 100 documents with the + // color facet "Red" and 200 documents with the color facet "Blue". A + // query containing the filter "color:ANY("Red")" and having "color" as + // FacetKey.key would by default return only "Red" documents in the + // search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" + // would not be shown as an available facet value. If "color" is listed + // in "excludedFilterKeys", then the query returns the facet values + // "Red" with count 100 and "Blue" with count 200, because the "color" + // key is now excluded from the filter. Because this field doesn't + // affect search results, the search results are still correctly + // filtered to return only "Red" documents. A maximum of 100 values are + // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConversationId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // Limit: Maximum of facet values that should be returned for this + // facet. If unspecified, defaults to 20. The maximum allowed value is + // 300. Values above 300 are coerced to 300. If this field is negative, + // an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableDynamicPosition") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConversationId") to + // NullFields is a list of field names (e.g. "EnableDynamicPosition") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11922,65 +11258,62 @@ type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest: Request message -// for WidgetService.WidgetSearch method. -type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { - // AdditionalParams: Additional params for security and privacy - // enhancement. - AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` - - // ConfigId: Required. The UUID of the Search WidgetConfig. This field - // is used to identify the search widget configuration, set of models - // used to make the search. - ConfigId string `json:"configId,omitempty"` - - // SearchRequest: Required. The search request to perform search. - SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey: +// Specifies how a facet is computed. +type GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when + // getting faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` - // ForceSendFields is a list of field names (e.g. "AdditionalParams") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Contains: Only get facet values that contains the given strings. For + // example, suppose "category" has three values "Action > 2022", "Action + // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + // Only supported on textual fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` - // NullFields is a list of field names (e.g. "AdditionalParams") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // Intervals: Set only if values should be bucketed into intervals. Must + // be set for facets with numerical values. Must not be set for facet + // with text values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1alphaInterval `json:"intervals,omitempty"` -func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` -// GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse: Response -// message for WidgetService.WidgetSearch method. -type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { - // SearchResponse: The search response after performing search. - SearchResponse *GoogleCloudDiscoveryengineV1alphaSearchResponse `json:"searchResponse,omitempty"` + // OrderBy: The order in which documents are returned. Allowed values + // are: * "count desc", which means order by + // SearchResponse.Facet.values.count descending. * "value desc", which + // means order by SearchResponse.Facet.values.value descending. Only + // applies to textual facets. If not set, textual values are sorted in + // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); + // numerical intervals are sorted in the order given by + // FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` - // UToken: The token in response. - UToken string `json:"uToken,omitempty"` + // Prefixes: Only get facet values that start with the given string + // prefix. For example, suppose "category" has three values "Action > + // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to + // "Action", the "category" facet only contains "Action > 2022" and + // "Action > 2021". Only supported on textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // RestrictedValues: Only get facet for the given restricted values. + // Only supported on textual fields. For example, suppose "category" has + // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If + // set "restricted_values" to "Action > 2022", the "category" facet only + // contains "Action > 2022". Only supported on textual fields. Maximum + // is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchResponse") to + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11988,7 +11321,7 @@ type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchResponse") to + // NullFields is a list of field names (e.g. "CaseInsensitive") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11998,25 +11331,20 @@ type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestFacetSpecFacetKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery: Specifies +// the image query input. +type GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: + // JPEG, PNG, and BMP. + ImageBytes string `json:"imageBytes,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ImageBytes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12024,7 +11352,7 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ImageBytes") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -12033,55 +11361,33 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: -// Response message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - - // ForceSendFields is a list of field names (e.g. "TargetSites") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "TargetSites") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestImageQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion +// should occur. +type GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In + // this case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query + // is used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this + // field is set to true, unexpanded products are always at the top of + // the search results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12089,7 +11395,7 @@ type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -12098,25 +11404,29 @@ type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestQueryExpansionSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec: +// The specification for query spell correction. +type GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction should take effect to + // replace the original search query. Default to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this + // case, server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion + // if there is any and put in the SearchResponse.corrected_query. The + // spell suggestion will not be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search + // will be based on the corrected query if found. + Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Mode") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12124,8 +11434,8 @@ type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -12133,58 +11443,68 @@ type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponse: Response message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1alphaSearchResponse struct { + // AppliedControls: Controls applied as part of the Control service. + AppliedControls []string `json:"appliedControls,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // AttributionToken: A unique search token. This should be included in + // the UserEvent logs resulting from this search, which enables accurate + // attribution of search model performance. + AttributionToken string `json:"attributionToken,omitempty"` - // 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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // CorrectedQuery: Contains the spell corrected query, if found. If the + // spell correction type is AUTOMATIC, then the search results are based + // on corrected_query. Otherwise the original query is used for search. + CorrectedQuery string `json:"correctedQuery,omitempty"` - // 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Facets: Results of facets requested by user. + Facets []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacet `json:"facets,omitempty"` -func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.CreateTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` + // GuidedSearchResult: Guided search result. + GuidedSearchResult *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // NextPageToken: A token that can be sent as SearchRequest.page_token + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // QueryExpansionInfo: Query expansion information for the returned + // results. + QueryExpansionInfo *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` + + // RedirectUri: The URI of a customer-defined redirect page. If redirect + // action is triggered, no search is performed, and only redirect_uri + // and attribution_token are set in the response. + RedirectUri string `json:"redirectUri,omitempty"` + + // Results: A list of matched documents. The order represents the + // ranking. + Results []*GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult `json:"results,omitempty"` + + // Summary: A summary as part of the search results. This field is only + // returned if SearchRequest.ContentSearchSpec.summary_spec is set. + Summary *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary `json:"summary,omitempty"` + + // TotalSize: The estimated total count of matched items irrespective of + // pagination. The count of results returned by pagination may be less + // than the total_size that matches. + TotalSize int64 `json:"totalSize,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AppliedControls") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12192,100 +11512,35 @@ type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AppliedControls") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1betaDataStore struct { - // ContentConfig: Immutable. The content config of the data store. If - // this field is unset, the server behavior defaults to - // ContentConfig.NO_CONTENT. - // - // Possible values: - // "CONTENT_CONFIG_UNSPECIFIED" - Default value. - // "NO_CONTENT" - Only contains documents without any - // Document.content. - // "CONTENT_REQUIRED" - Only contains documents with Document.content. - // "PUBLIC_WEBSITE" - The data store is used for public website - // search. - ContentConfig string `json:"contentConfig,omitempty"` - - // CreateTime: Output only. Timestamp the DataStore was created at. - CreateTime string `json:"createTime,omitempty"` - - // DefaultSchemaId: Output only. The id of the default Schema - // asscociated to this data store. - DefaultSchemaId string `json:"defaultSchemaId,omitempty"` - - // DisplayName: Required. The data store display name. This field must - // be a UTF-8 encoded string with a length limit of 128 characters. - // Otherwise, an INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` - - // DocumentProcessingConfig: Configuration for Document understanding - // and enrichment. - DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` - - // IndustryVertical: Immutable. The industry vertical that the data - // store registers. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - - // Name: Immutable. The full resource name of the data store. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseFacet: A facet result. +type GoogleCloudDiscoveryengineV1alphaSearchResponseFacet struct { + // DynamicFacet: Whether the facet is dynamically generated. + DynamicFacet bool `json:"dynamicFacet,omitempty"` - // SolutionTypes: The solutions that the data store enrolls. Available - // solutions for each industry_vertical: * `MEDIA`: - // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * - // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. - // Other solutions cannot be enrolled. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionTypes []string `json:"solutionTypes,omitempty"` + // Key: The key for this facet. E.g., "colors" or "price". It matches + // SearchRequest.FacetSpec.FacetKey.key. + Key string `json:"key,omitempty"` - // StartingSchema: The start schema to use for this DataStore when - // provisioning it. If unset, a default vertical specialized schema will - // be used. This field is only used by CreateDataStore API, and will be - // ignored if used in other APIs. This field will be omitted from all - // API responses including CreateDataStore API. To retrieve a schema of - // a DataStore, use SchemaService.GetSchema API instead. The provided - // schema will be validated against certain rules on schema. Learn more - // from this doc - // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). - StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // Values: The facet values for this field. + Values []*GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue `json:"values,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // ForceSendFields is a list of field names (e.g. "DynamicFacet") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12293,7 +11548,7 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") to include + // NullFields is a list of field names (e.g. "DynamicFacet") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -12302,25 +11557,26 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDataStore +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacet raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata -// related to the progress of the DataStoreService.DeleteDataStore -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue: A +// facet value which contains value names and their count. +type GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue struct { + // Count: Number of items that have this facet value. + Count int64 `json:"count,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Interval: Interval value for a facet, such as 10, 20) for facet + // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + Interval *GoogleCloudDiscoveryengineV1alphaInterval `json:"interval,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // Value: Text value of a facet, such as "Black" for facet "colors". + Value string `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12328,8 +11584,8 @@ type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -12337,25 +11593,24 @@ type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseFacetFacetValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata -// related to the progress of the EngineService.DeleteEngine operation. -// This will be returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo: +// Debug information specifically related to forward geocoding issues +// arising from Geolocation Search. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo struct { + // ErrorMessage: The error produced. + ErrorMessage string `json:"errorMessage,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // OriginalAddressQuery: The address from which forward geocoding + // ingestion produced issues. + OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12363,67 +11618,68 @@ type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorMessage") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult: +// Guided search result. The guided search helps user to refine the +// search results and narrow down to the real needs from a broaded +// search results. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult struct { + // FollowUpQuestions: Suggested follow-up questions. + FollowUpQuestions []string `json:"followUpQuestions,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // RefinementAttributes: A list of ranked refinement attributes. + RefinementAttributes []*GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FollowUpQuestions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.DeleteTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefin +// ementAttribute: Useful attribute for search result refinements. +type GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute struct { + // AttributeKey: Attribute key used to refine the results e.g. + // 'movie_type'. + AttributeKey string `json:"attributeKey,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // AttributeValue: Attribute value used to refine the results e.g. + // 'drama'. + AttributeValue string `json:"attributeValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "AttributeKey") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12431,34 +11687,35 @@ type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AttributeKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResultRefinementAttribute raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This -// will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo: +// Information describing query expansion including whether expansion +// has occurred. +type GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo struct { + // ExpandedQuery: Bool describing whether query expansion has occurred. + ExpandedQuery bool `json:"expandedQuery,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PinnedResultCount: Number of pinned results. This field will only be + // set when expansion happens and + // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to + // true. + PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12466,102 +11723,107 @@ type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ExpandedQuery") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseQueryExpansionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: -// Response message for -// SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { -} +// GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult: +// Represents the search results. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult struct { + // Chunk: The chunk data in the search response if the + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + Chunk *GoogleCloudDiscoveryengineV1alphaChunk `json:"chunk,omitempty"` -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton -// resource of DataStore. It's empty when DataStore is created, which -// defaults to digital parser. The first call to -// DataStoreService.UpdateDocumentProcessingConfig method will -// initialize the config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { - // DefaultParsingConfig: Configurations for default Document parser. If - // not specified, we will configure it as default DigitalParsingConfig, - // and the default parsing config will be applied to all file types for - // Document parsing. - DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + // Document: The document data snippet in the search response. Only + // fields that are marked as retrievable are populated. + Document *GoogleCloudDiscoveryengineV1alphaDocument `json:"document,omitempty"` - // Name: The full resource name of the Document Processing Config. - // Format: - // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC - // onfig`. - Name string `json:"name,omitempty"` + // Id: Document.id of the searched Document. + Id string `json:"id,omitempty"` - // ParsingConfigOverrides: Map from file type to override the default - // parsing configuration based on the file type. Supported keys: * - // `pdf`: Override parsing config for PDF files, either digital parsing, - // ocr parsing or layout parsing is supported. * `html`: Override - // parsing config for HTML files, only digital parsing and or layout - // parsing are supported. * `docx`: Override parsing config for DOCX - // files, only digital parsing and or layout parsing are supported. - ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + // ModelScores: Google provided available scores. + ModelScores map[string]GoogleCloudDiscoveryengineV1alphaDoubleList `json:"modelScores,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DefaultParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Chunk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultParsingConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: -// -// Related configurations applied to a specific type of document -// -// parser. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { - // DigitalParsingConfig: Configurations applied to digital parser. - DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummary: Summary of +// the top N search result specified by the summary spec. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and + // their associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` - // OcrParsingConfig: Configurations applied to OCR parser. Currently it - // only applies to PDFs. - OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + // SummarySkippedReasons: Additional summary-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. + // + // Possible values: + // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // Only populated when SummarySpec.ignore_adversarial_query is set to + // `true`. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query + // ignored case. Only populated when + // SummarySpec.ignore_non_summary_seeking_query is set to `true`. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the summary if there are no high-relevance search + // results. For example, the data store contains facts about company A + // but the user query is asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google + // skips the summary if the LLM addon is not enabled. + SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DigitalParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // SummaryText: The summary content. + SummaryText string `json:"summaryText,omitempty"` + + // SummaryWithMetadata: Summary with metadata information. + SummaryWithMetadata *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DigitalParsingConfig") to + // NullFields is a list of field names (e.g. "SafetyAttributes") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -12571,68 +11833,55 @@ type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struc NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummary raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigD -// igitalParsingConfig: The digital parsing configurations for -// documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { -} +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation: +// Citation info for a segment. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigO -// crParsingConfig: The OCR parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { - // EnhancedDocumentElements: Apply additional enhanced OCR processing to - // a list of document elements. Supported values: * `table`: advanced - // table parsing model. - EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource `json:"sources,omitempty"` - // UseNativeText: If true, will use native text instead of OCR text on - // pages containing native text. - UseNativeText bool `json:"useNativeText,omitempty"` + // StartIndex: Index indicates the start of the segment, measured in + // bytes/unicode. + StartIndex int64 `json:"startIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "EnhancedDocumentElements") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnhancedDocumentElements") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "EndIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata +// : Citation metadata. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata struct { + // Citations: Citations for segments. + Citations []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitation `json:"citations,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Citations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12640,7 +11889,7 @@ type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Citations") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -12649,95 +11898,21 @@ type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: -// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the -// training and serving parameters of an Engine. -type GoogleCloudDiscoveryengineV1betaEngine struct { - // ChatEngineConfig: Configurations for the Chat Engine. Only applicable - // if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - - // ChatEngineMetadata: Output only. Additional information of the Chat - // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - - // CommonConfig: Common config spec that specifies the metadata of the - // engine. - CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` - - // CreateTime: Output only. Timestamp the Recommendation Engine was - // created at. - CreateTime string `json:"createTime,omitempty"` - - // DataStoreIds: The data stores associated with this engine. For - // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of - // engines, they can only associate with at most one data store. If - // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same - // Collection can be associated here. Note that when used in - // CreateEngineRequest, one DataStore id must be provided as the system - // will use it for necessary initializations. - DataStoreIds []string `json:"dataStoreIds,omitempty"` - - // DisplayName: Required. The display name of the engine. Should be - // human readable. UTF-8 encoded string with limit of 1024 characters. - DisplayName string `json:"displayName,omitempty"` - - // IndustryVertical: The industry vertical that the engine registers. - // The restriction of the Engine industry vertical is based on - // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine - // has to match vertical of the DataStore liniked to the engine. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` - - // Name: Immutable. The fully qualified resource name of the engine. - // This field must be a UTF-8 encoded string with a length limit of 1024 - // characters. Format: - // `projects/{project_number}/locations/{location}/collections/{collectio - // n}/engines/{engine}` engine should be 1-63 characters, and valid - // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is - // returned. - Name string `json:"name,omitempty"` - - // SearchEngineConfig: Configurations for the Search Engine. Only - // applicable if solution_type is SOLUTION_TYPE_SEARCH. - SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` - - // SolutionType: Required. The solutions of the engine. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionType string `json:"solutionType,omitempty"` - - // UpdateTime: Output only. Timestamp the Recommendation Engine was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource: +// Citation source. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource struct { + // ReferenceIndex: Document reference index from + // SummaryWithMetadata.references. It is 0-indexed and the value will be + // zero if the reference_index is not set explicitly. + ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12745,7 +11920,7 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChatEngineConfig") to + // NullFields is a list of field names (e.g. "ReferenceIndex") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -12755,88 +11930,64 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngine +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: -// Configurations for a Chat Engine. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { - // AgentCreationConfig: The configurationt generate the Dialogflow agent - // that is associated to this Engine. Note that these configurations are - // one-time consumed by and passed to Dialogflow service. It means they - // cannot be retrieved using EngineService.GetEngine or - // EngineService.ListEngines API after engine creation. - AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference: +// Document reference. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference struct { + // ChunkContents: List of cited chunk contents derived from document + // content. + ChunkContents []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` - // DialogflowAgentToLink: The resource name of an exist Dialogflow agent - // to link to this Chat Engine. Customers can either provide - // `agent_creation_config` to create agent or provide an agent name that - // links the agent with the Chat engine. Format: - // `projects//locations//agents/`. Note that the - // `dialogflow_agent_to_link` are one-time consumed by and passed to - // Dialogflow service. It means they cannot be retrieved using - // EngineService.GetEngine or EngineService.ListEngines API after engine - // creation. Please use ChatEngineMetadata.dialogflow_agent for actual - // agent association after Engine is created. - DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + // Document: Required. Document.name of the document. Full resource name + // of the referenced document, in the format + // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document + // s/*`. + Document string `json:"document,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") - // to unconditionally include in API requests. By default, fields with + // Title: Title of the document. + Title string `json:"title,omitempty"` + + // Uri: Cloud Storage or HTTP uri for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkContents") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AgentCreationConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ChunkContents") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationCon -// fig: Configurations for generating a Dialogflow agent. Note that -// these configurations are one-time consumed by and passed to -// Dialogflow service. It means they cannot be retrieved using -// EngineService.GetEngine or EngineService.ListEngines API after engine -// creation. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { - // Business: Name of the company, organization or other entity that the - // agent represents. Used for knowledge connector LLM prompt and for - // knowledge search. - Business string `json:"business,omitempty"` - - // DefaultLanguageCode: Required. The default language of the agent as a - // language tag. See Language Support - // (https://cloud.google.com/dialogflow/docs/reference/language) for a - // list of the currently supported language codes. - DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` - - // Location: Agent location for Agent creation, supported values: - // global/us/eu. If not provided, us Engine will create Agent using - // us-central-1 by default; eu Engine will create Agent using eu-west-1 - // by default. - Location string `json:"location,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkCo +// ntent: Chunk content. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // TimeZone: Required. The time zone of the agent from the time zone - // database (https://www.iana.org/time-zones), e.g., America/New_York, - // Europe/Paris. - TimeZone string `json:"timeZone,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "Business") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12844,7 +11995,7 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Business") to include in + // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -12853,20 +12004,24 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig s NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReferenceChunkContent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional -// information of a Chat Engine. Fields in this message are output only. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { - // DialogflowAgent: The resource name of a Dialogflow agent, that this - // Chat Engine refers to. Format: `projects//locations//agents/`. - DialogflowAgent string `json:"dialogflowAgent,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes +// : Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories + // associated with the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` - // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to + // Scores: The confidence scores of the each category, higher value + // means higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Categories") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12874,31 +12029,51 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DialogflowAgent") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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 string `json:"companyName,omitempty"` +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySafetyAttributes + 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 +} - // ForceSendFields is a list of field names (e.g. "CompanyName") to +// GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetad +// ata: Summary with metadata information. +type GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata struct { + // CitationMetadata: Citation metadata for given summary. + CitationMetadata *GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` + + // References: Document References. + References []*GoogleCloudDiscoveryengineV1alphaSearchResponseSummaryReference `json:"references,omitempty"` + + // Summary: Summary text with no citation information. + Summary string `json:"summary,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CitationMetadata") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12906,45 +12081,167 @@ type GoogleCloudDiscoveryengineV1betaEngineCommonConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompanyName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CitationMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig +func (s *GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSearchResponseSummarySummaryWithMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: -// Configurations for a Search Engine. -type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { - // SearchAddOns: The add-on that this search engine enables. - // - // Possible values: - // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_ADD_ON_LLM" - Large language model add-on. - SearchAddOns []string `json:"searchAddOns,omitempty"` +// GoogleCloudDiscoveryengineV1alphaServingConfig: Configures metadata +// that is used to generate serving time results (e.g. search results or +// recommendation predictions). The ServingConfig is passed in the +// search and predict request and generates results. +type GoogleCloudDiscoveryengineV1alphaServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered + // boost controls will be applied. Boost controls must be in the same + // data store as the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` - // SearchTier: The search feature tier of this engine. Different tiers - // might have different pricing. To learn more, please check the pricing - // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not - // specified. + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + + // CustomFineTuningSpec: Custom fine tuning configs. + CustomFineTuningSpec *GoogleCloudDiscoveryengineV1alphaCustomFineTuningSpec `json:"customFineTuningSpec,omitempty"` + + // DisplayName: Required. The human readable serving config display + // name. Used in Discovery UI. This field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DissociateControlIds: Condition do not associate specifications. If + // multiple do not associate conditions match, all matching do not + // associate controls in the list will execute. Order does not matter. + // Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + + // DiversityLevel: How much diversity to use in recommendation model + // results e.g. `medium-diversity` or `high-diversity`. Currently + // supported values: * `no-diversity` * `low-diversity` * + // `medium-diversity` * `high-diversity` * `auto-diversity` If not + // specified, we choose default based on recommendation model type. + // Default value: `no-diversity`. Can only be set if SolutionType is + // SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + + // EmbeddingConfig: Bring your own embedding config. The config is used + // for search semantic retrieval. The retrieval is based on the dot + // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the + // document embeddings that are provided by this EmbeddingConfig. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it + // overrides this ServingConfig.embedding_config. + EmbeddingConfig *GoogleCloudDiscoveryengineV1alphaEmbeddingConfig `json:"embeddingConfig,omitempty"` + + // FilterControlIds: Filter controls to use in serving path. All + // triggered filter controls will be applied. Filter controls must be in + // the same data store as the serving config. Maximum of 20 filter + // controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig `json:"genericConfig,omitempty"` + + // GuidedSearchSpec: Guided search configs. + GuidedSearchSpec *GoogleCloudDiscoveryengineV1alphaGuidedSearchSpec `json:"guidedSearchSpec,omitempty"` + + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will + // execute. Order does not matter. Maximum number of specifications is + // 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig `json:"mediaConfig,omitempty"` + + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a + // compatible model (e.g. others-you-may-like CTR to others-you-may-like + // CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/e + // ngines/{engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. + // If multiple oneway synonyms conditions match, all matching oneway + // synonyms controls in the list will execute. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + + // RankingExpression: The ranking expression controls the customized + // ranking on retrieval documents. To leverage this, document embedding + // is required. The ranking expression setting in ServingConfig applies + // to all search requests served by the serving config. However, if + // SearchRequest.ranking_expression is specified, it overrides the + // ServingConfig ranking expression. The ranking expression is a single + // function or multiple functions that are joined by "+". * + // ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: relevance_score: + // pre-defined keywords, used for measure relevance between query and + // document. embedding_field_path: the document embedding field used + // with query embedding vector. dotProduct: embedding function between + // embedding_field_path and query embedding vector. Example ranking + // expression: If document has an embedding field doc_embedding, the + // ranking expression could be 0.5 * relevance_score + 0.3 * + // dotProduct(doc_embedding). + RankingExpression string `json:"rankingExpression,omitempty"` + + // RedirectControlIds: IDs of the redirect controls. Only the first + // triggered redirect action is applied, even if multiple apply. Maximum + // number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can + // not be re-replaced. Maximum number of specifications is 100. Can only + // be set if SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. // // Possible values: - // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_TIER_STANDARD" - Standard tier. - // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. - SearchTier string `json:"searchTier,omitempty"` + // "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"` - // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // SynonymsControlIds: Condition synonyms specifications. If multiple + // synonyms conditions match, all matching synonyms controls in the list + // will execute. Maximum number of specifications is 100. Can only be + // set if SolutionType is SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + + // UpdateTime: Output only. ServingConfig updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BoostControlIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12952,70 +12249,163 @@ type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchAddOns") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "BoostControlIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig +func (s *GoogleCloudDiscoveryengineV1alphaServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaGroundingConfig: Grounding -// configuration. -type GoogleCloudDiscoveryengineV1betaGroundingConfig struct { - // Name: Required. Name of the GroundingConfig, of the form - // `projects/{project}/locations/{location}/groundingConfig`. - Name string `json:"name,omitempty"` +// GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig: +// Specifies the configurations needed for Generic Discovery.Currently +// we support: * `content_search_spec`: configuration for generic +// content search. +type GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. + // Only valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaGroundingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaGroundingConfig + // NullFields is a list of field names (e.g. "ContentSearchSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigGenericConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig: Specifies +// the configurations needed for Media Discovery. Currently we support: +// * `demote_content_watched`: Threshold for watched content demotion. +// Customers can specify if using watched content demotion or use viewed +// detail page. Using the content watched demotion, customers need to +// specify the watched minutes or percentage exceeds the threshold, the +// content will be demoted in the recommendation result. * +// `promote_fresh_content`: cutoff days for fresh content promotion. +// Customers can specify if using content freshness promotion. If the +// content was published within the cutoff days, the content will be +// promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were + // published for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` + // ContentWatchedPercentageThreshold: Specifies the content watched + // percentage threshold for demotion. Threshold value must be between + // [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // DemotionEventType: Specifies the event type used for demoting + // recommendation result. Currently supported values: * `view-item`: + // Item viewed. * `media-play`: Start/resume watching a video, playing a + // song, etc. * `media-complete`: Finished or stopped midway through a + // video, song, etc. If unset, watch history demotion will not be + // applied. Content freshness demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaSession: External session proto +// definition. +type GoogleCloudDiscoveryengineV1alphaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*` + Name string `json:"name,omitempty"` + + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` + + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13023,7 +12413,7 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -13032,27 +12422,22 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSession raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, +// including a query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { + // Answer: The resource name of the answer to the user query. + Answer string `json:"answer,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "Answer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13060,31 +12445,34 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSiteSearchEngine: SiteSearchEngine +// captures DataStore level site search persisting configurations. It is +// a singleton value per data store. +type GoogleCloudDiscoveryengineV1alphaSiteSearchEngine struct { + // Name: The fully qualified resource name of the site search engine. + // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13092,8 +12480,8 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in - // API requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -13101,25 +12489,80 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSiteSearchEngine raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadat -// a: Metadata related to the progress of the -// ImportSuggestionDenyListEntries operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the + // ownership and validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification + // failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website + // that opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. + // "SiteVerificationState") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSpannerSource: The Spanner source +// for importing data +type GoogleCloudDiscoveryengineV1alphaSpannerSource struct { + // DatabaseId: Required. The database ID of the source Spanner table. + DatabaseId string `json:"databaseId,omitempty"` + + // EnableDataBoost: Whether to apply data boost on Spanner export. + // Enabling this option will incur additional cost. More info can be + // found here + // (https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + EnableDataBoost bool `json:"enableDataBoost,omitempty"` + + // InstanceId: Required. The instance ID of the source Spanner table. + InstanceId string `json:"instanceId,omitempty"` + + // ProjectId: The project ID that the Spanner source is in with a length + // limit of 128 characters. If not specified, inherits the project ID + // from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The table name of the Spanner database that needs + // to be imported. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13127,7 +12570,7 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "DatabaseId") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -13136,29 +12579,33 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1alphaSpannerSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSpannerSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRespons -// e: Response message for -// CompletionService.ImportSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // FailedEntriesCount: Count of deny list entries that failed to be - // imported. - FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry: Suggestion +// deny list entry identifying the phrase to block from suggestions and +// the applied operation for the phrase. +type GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry struct { + // BlockPhrase: Required. Phrase to block from suggestions served. Can + // be maximum 125 characters. + BlockPhrase string `json:"blockPhrase,omitempty"` - // ImportedEntriesCount: Count of deny list entries successfully - // imported. - ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` + // MatchOperator: Required. The match operator to apply for this phrase. + // Whether to block the exact phrase, or block any suggestions + // containing this phrase. + // + // Possible values: + // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used + // "EXACT_MATCH" - If the suggestion is an exact match to the + // block_phrase, then block it. + // "CONTAINS" - If the suggestion contains the block_phrase, then + // block it. + MatchOperator string `json:"matchOperator,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // ForceSendFields is a list of field names (e.g. "BlockPhrase") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13166,7 +12613,7 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include + // NullFields is a list of field names (e.g. "BlockPhrase") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -13175,31 +12622,78 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse +func (s *GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSuggestionDenyListEntry raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1alphaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated + // to include all pages whose address contains the provided_uri_pattern. + // If set to true, an uri_pattern is generated to try to be an exact + // match of the provided_uri_pattern or just the specific page if the + // provided_uri_pattern is a specific one. provided_uri_pattern is + // always normalized to generate the URI pattern to be used by the + // search engine. + ExactMatch bool `json:"exactMatch,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason `json:"failureReason,omitempty"` - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // GeneratedUriPattern: Output only. This is system-generated based on + // the provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be + // picked up by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to + // be deleted. This is a transitioning state which will resulted in + // either: 1. target site deleted if unindexing is successful; 2. state + // reverts to SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + + // Name: Output only. The fully qualified resource name of the target + // site. + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + + // ProvidedUriPattern: Required. Input only. The user provided URI + // pattern from which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + + // SiteVerificationInfo: Output only. Site ownership and validity + // verification status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + + // Type: The type of the target site, e.g., whether the site is to be + // included or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server + // behavior defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The target site's last updated time. UpdateTime string `json:"updateTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13207,7 +12701,7 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ExactMatch") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -13216,35 +12710,19 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSite raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of -// the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13252,7 +12730,7 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include + // NullFields is a list of field names (e.g. "QuotaFailure") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -13261,72 +12739,52 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure: +// Failed due to insufficient quota. +type GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total + // quota this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "TotalRequiredQuota") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaTextInput: Defines text input. +type GoogleCloudDiscoveryengineV1alphaTextInput struct { + // Context: Conversation context of the input. + Context *GoogleCloudDiscoveryengineV1alphaConversationContext `json:"context,omitempty"` - // 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"` + // Input: Text input. + Input string `json:"input,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ForceSendFields is a list of field names (e.g. "Context") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13334,7 +12792,7 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PurgeCount") to include in + // NullFields is a list of field names (e.g. "Context") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -13343,17 +12801,16 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1alphaTextInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTextInput raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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 { +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata: Metadata +// related to the progress of the TrainCustomModel operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -13378,24 +12835,28 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse -// : Response message for -// CompletionService.PurgeSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest: Request +// message for SearchTuningService.TrainCustomModel method. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest struct { + // ErrorConfig: The desired location of errors incurred during the data + // ingestion and training. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // PurgeCount: Number of suggestion deny list entries purged. - PurgeCount int64 `json:"purgeCount,omitempty,string"` + // GcsTrainingInput: Cloud Storage training input. + GcsTrainingInput *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // ModelType: Model to be trained. Supported values are: * + // **search-tuning**: Fine tuning the search system based on data + // provided. + ModelType string `json:"modelType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13403,7 +12864,7 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include + // NullFields is a list of field names (e.g. "ErrorConfig") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -13412,29 +12873,43 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse +func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInp +// ut: Cloud Storage training data input. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput struct { + // CorpusDataPath: The Cloud Storage corpus data which could be + // associated in train data. The data path format is `gs:///`. A newline + // delimited jsonl/ndjson file. For search-tuning model, each line + // should have the _id, title and text. Example: `{"_id": "doc1", title: + // "relevant doc", "text": "relevant text"}` + CorpusDataPath string `json:"corpusDataPath,omitempty"` - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` + // QueryDataPath: The gcs query data which could be associated in train + // data. The data path format is `gs:///`. A newline delimited + // jsonl/ndjson file. For search-tuning model, each line should have the + // _id and text. Example: {"_id": "query1", "text": "example query"} + QueryDataPath string `json:"queryDataPath,omitempty"` - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + // TestDataPath: Cloud Storage test data. Same format as + // train_data_path. If not provided, a random 80/20 train/test split + // will be performed on train_data_path. + TestDataPath string `json:"testDataPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // TrainDataPath: Cloud Storage training data path whose format should + // be `gs:///`. The file should be in tsv format. Each line should have + // the doc_id and query_id and score (number). For search-tuning model, + // it should have the query-id corpus-id score as tsv file header. The + // score should be a number in `[0, inf+)`. The larger the number is, + // the more relevant the pair is. Example: * + // `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` + TrainDataPath string `json:"trainDataPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorpusDataPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13442,49 +12917,7 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the - // ownership and validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification - // failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website - // that opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` - - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "SiteVerificationState") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "SiteVerificationState") to + // NullFields is a list of field names (e.g. "CorpusDataPath") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -13494,103 +12927,37 @@ type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo +func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequestGcsTrainingInput raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1betaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated - // to include all pages whose address contains the provided_uri_pattern. - // If set to true, an uri_pattern is generated to try to be an exact - // match of the provided_uri_pattern or just the specific page if the - // provided_uri_pattern is a specific one. provided_uri_pattern is - // always normalized to generate the URI pattern to be used by the - // search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` - - // GeneratedUriPattern: Output only. This is system-generated based on - // the provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` - - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be - // picked up by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to - // be deleted. This is a transitioning state which will resulted in - // either: 1. target site deleted if unindexing is successful; 2. state - // reverts to SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` - - // Name: Output only. The fully qualified resource name of the target - // site. - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` - - // ProvidedUriPattern: Required. Input only. The user provided URI - // pattern from which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` - - // SiteVerificationInfo: Output only. Site ownership and validity - // verification status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` - - // Type: The type of the target site, e.g., whether the site is to be - // included or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server - // behavior defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` - - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse: Response +// of the TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1alphaImportErrorConfig `json:"errorConfig,omitempty"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // ErrorSamples: A sample of errors encountered while processing the + // data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` -func (s *GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + // ModelStatus: The trained model status. Possible values are: * + // **bad-data**: The training data quality is bad. * **no-improvement**: + // Tuning didn't improve performance. Won't deploy. * **in-progress**: + // Model training job creation is in progress. * **training**: Model is + // actively training. * **evaluating**: The model is evaluating trained + // metrics. * **indexing**: The model trained metrics are indexing. * + // **ready**: The model is ready for serving. + ModelStatus string `json:"modelStatus,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13598,7 +12965,7 @@ type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") to include + // NullFields is a list of field names (e.g. "ErrorConfig") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -13607,55 +12974,47 @@ type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason +func (s *GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: -// Failed due to insufficient quota. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total - // quota this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` +// GoogleCloudDiscoveryengineV1alphaTransactionInfo: A transaction +// represents the entire purchase transaction. +type GoogleCloudDiscoveryengineV1alphaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be + // manufacturing costs, shipping expenses not borne by the end user, or + // any other costs, such that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // DiscountValue: The total discount(s) value applied to this + // transaction. This figure should be excluded from + // TransactionInfo.value For example, if a user paid + // TransactionInfo.value amount, then nominal (pre-discount) value of + // the transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated + // the same way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than + // TransactionInfo.value: * Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` -func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` -// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata -// related to the progress of the TrainCustomModel operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` + // TransactionId: The transaction ID with a length limit of 128 + // characters. + TransactionId string `json:"transactionId,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Value: Required. Total non-zero value associated with the + // transaction. This value may include shipping, tax, or other + // adjustments to the total value that you want to include. + Value float64 `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Cost") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -13663,8 +13022,8 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Cost") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -13672,60 +13031,35 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of -// the TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // ErrorSamples: A sample of errors encountered while processing the - // data. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // Metrics: The metrics of the trained model. - Metrics map[string]float64 `json:"metrics,omitempty"` - - // ModelStatus: The trained model status. Possible values are: * - // **bad-data**: The training data quality is bad. * **no-improvement**: - // Tuning didn't improve performance. Won't deploy. * **in-progress**: - // Model training is in progress. * **ready**: The model is ready for - // serving. - ModelStatus string `json:"modelStatus,omitempty"` - - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GoogleCloudDiscoveryengineV1alphaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil } -// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata +// GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata: Metadata // associated with a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { +type GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata struct { // Engine: Required. The resource name of the engine that this tune // applies to. Format: // `projects/{project_number}/locations/{location_id}/collections/{collec @@ -13749,15 +13083,26 @@ type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// GoogleCloudDiscoveryengineV1alphaTuneEngineRequest: Request to +// manually start a tuning process now (instead of waiting for the +// periodically scheduled tuning to happen). +type GoogleCloudDiscoveryengineV1alphaTuneEngineRequest struct { +} + +// GoogleCloudDiscoveryengineV1alphaTuneEngineResponse: Response +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1alphaTuneEngineResponse struct { +} + +// GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata: Metadata for // UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { +type GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -13782,17 +13127,17 @@ type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata +// GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata // related to the progress of the // SiteSearchEngineService.UpdateTargetSite operation. This will be // returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { +type GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -13817,239 +13162,5999 @@ type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1alphaUserEvent: UserEvent captures all +// metadata information Discovery Engine API needs to know about how end +// users interact with customers' website. +type GoogleCloudDiscoveryengineV1alphaUserEvent struct { + // Attributes: Extra user event features to include in the + // recommendation model. These attributes must NOT contain data that + // needs to be parsed or processed further, e.g. JSON or other + // encodings. If you provide custom attributes for ingested user events, + // also include them in the user events that you associate with + // prediction requests. Custom attribute formatting must be consistent + // between imported events and events provided with prediction requests. + // This lets the Discovery Engine API use those custom attributes when + // training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be + // a UTF-8 encoded string with a length limit of 5,000 characters. * For + // text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length + // limit of 256 characters. * For number attributes, at most 400 values + // are allowed. For product recommendations, an example of extra user + // information is `traffic_channel`, which is how a user arrives at the + // site. Users can arrive at the site by coming to the site directly, + // coming through Google search, or in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1alphaCustomAttribute `json:"attributes,omitempty"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // AttributionToken: Token to attribute an API response to user + // action(s) to trigger the event. Highly recommended for user events + // that are the result of RecommendationService.Recommend. This field + // enables accurate attribution of recommendation model performance. The + // value must be one of: * RecommendResponse.attribution_token for + // events that are the result of RecommendationService.Recommend. * + // SearchResponse.attribution_token for events that are the result of + // SearchService.Search. This token enables us to accurately attribute + // page view or conversion completion back to the event and the + // particular predict response containing this clicked/purchased + // product. If user clicks on product K in the recommendation results, + // pass RecommendResponse.attribution_token as a URL parameter to + // product K's page. When recording events on product K's page, log the + // RecommendResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // CompletionInfo: CompletionService.CompleteQuery details related to + // the event. This field should be set for `search` event when + // autocomplete function is enabled and the user clicks a suggestion for + // search. + CompletionInfo *GoogleCloudDiscoveryengineV1alphaCompletionInfo `json:"completionInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` + // DirectUserRequest: Should set to true if the request is made directly + // from the end user, in which case the UserEvent.user_info.user_agent + // can be populated from the HTTP request. This flag should be set only + // if the API request is made directly from the end user such as a + // mobile app (and not if a gateway or a server is processing and + // pushing the user events). This should not be set when using the + // JavaScript tag in UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} + // Documents: List of Documents associated with this user event. This + // field is optional except for the following event types: * `view-item` + // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a + // `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished + // browsing the whole page yet). When a new page is returned to the end + // user, after pagination/filtering/ordering even for the same query, a + // new `search` event with different UserEvent.documents is desired. + Documents []*GoogleCloudDiscoveryengineV1alphaDocumentInfo `json:"documents,omitempty"` -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // EventTime: Only required for UserEventService.ImportUserEvents + // method. Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` + // EventType: Required. User event type. Allowed values are: Generic + // values: * `search`: Search for Documents. * `view-item`: Detailed + // page view of a Document. * `view-item-list`: View of a panel or + // ordered list of Documents. * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > + // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, + // e.g. in Retail online shopping * `purchase`: Purchase an item(s) + // Media-related values: * `media-play`: Start/resume watching a video, + // playing a song, etc. * `media-complete`: Finished or stopped midway + // through a video, song, etc. + EventType string `json:"eventType,omitempty"` - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. One example is for `search` events, the associated + // SearchRequest may contain a filter expression in SearchRequest.filter + // conforming to https://google.aip.dev/160#filtering. Similarly, for + // `view-item-list` events that are generated from a RecommendRequest, + // this field may be populated directly from RecommendRequest.filter + // conforming to https://google.aip.dev/160#filtering. The value must be + // a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Filter string `json:"filter,omitempty"` - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1alphaMediaInfo `json:"mediaInfo,omitempty"` - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. + // PageInfo: Page metadata such as categories and other critical + // information for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1alphaPageInfo `json:"pageInfo,omitempty"` + + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1alphaPanelInfo `json:"panel,omitempty"` + + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // SearchInfo: SearchService.Search details related to the event. This + // field should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1alphaSearchInfo `json:"searchInfo,omitempty"` + + // SessionId: A unique identifier for tracking a visitor session with a + // length limit of 128 bytes. A session is an aggregation of an end user + // behavior in a time span. A general guideline to populate the + // session_id: 1. If user has no activity for 30 min, a new session_id + // should be assigned. 2. The session_id should be unique across users, + // suggest use uuid or add UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + + // TagIds: A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user + // events associated with different experiment setups on the customer + // end. + TagIds []string `json:"tagIds,omitempty"` + + // TransactionInfo: The transaction metadata (if any) associated with + // this user event. + TransactionInfo *GoogleCloudDiscoveryengineV1alphaTransactionInfo `json:"transactionInfo,omitempty"` + + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1alphaUserInfo `json:"userInfo,omitempty"` + + // UserPseudoId: Required. A unique identifier for tracking visitors. + // For example, this could be implemented with an HTTP cookie, which + // should be able to uniquely identify a visitor on a single device. + // This unique identifier should not change if the visitor log in/out of + // the website. Do not set the field to the same fixed ID for different + // users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded + // string with a length limit of 128 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. The field should not contain + // PII or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaUserInfo: Information of an end +// user. +type GoogleCloudDiscoveryengineV1alphaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must + // be a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not + // be set when using the client side event reporting with GTM or + // JavaScript tag in UserEventService.CollectUserEvent or if + // UserEvent.direct_user_request is set. + UserAgent string `json:"userAgent,omitempty"` + + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. + // Always use a hashed value for this ID. Don't set the field to the + // same fixed ID for different users. This mixes the event history of + // those users together, which results in degraded model quality. The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserAgent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UserAgent") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest: Request +// message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` + + // CompleteQueryRequest: Required. The CompleteQuery request to perform + // auto-complete suggestion query. + CompleteQueryRequest *GoogleCloudDiscoveryengineV1alphaCompleteQueryRequest `json:"completeQueryRequest,omitempty"` + + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // auto complete query. + ConfigId string `json:"configId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse: +// Response message for WidgetService.WidgetCompleteQuery method. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse struct { + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` + + // WidgetQuerySuggestions: Results of the matched query suggestions in + // widget. The result list is ordered and the first result is a top + // suggestion. + WidgetQuerySuggestions []*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion `json:"widgetQuerySuggestions,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "UToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UToken") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuer +// ySuggestion: Suggestions as search queries. +type GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion struct { + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Suggestion") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Suggestion") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponseWidgetQuerySuggestion + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfig: WidgetConfig captures +// configs at the Widget level. +type GoogleCloudDiscoveryengineV1alphaWidgetConfig struct { + // AllowPublicAccess: Whether allow no-auth integration with widget. If + // set true, public access to search or other solutions from widget is + // allowed without authenication token provided by customer hosted + // backend server. + AllowPublicAccess bool `json:"allowPublicAccess,omitempty"` + + // AllowlistedDomains: Allowlisted domains that can load this widget. + AllowlistedDomains []string `json:"allowlistedDomains,omitempty"` + + // CollectionComponents: Output only. Collection components that lists + // all collections and child data stores associated with the widget + // config, those data sources can be used for filtering in widget + // service APIs, users can return results that from selected data + // sources. + CollectionComponents []*GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent `json:"collectionComponents,omitempty"` + + // ConfigId: Output only. Unique obfuscated identifier of a + // WidgetConfig. + ConfigId string `json:"configId,omitempty"` + + // ContentSearchSpec: The content search spec that configs the desired + // behavior of content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // CreateTime: Output only. Timestamp the WidgetConfig was created. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreType: Output only. The type of the parent data store. + // + // Possible values: + // "DATA_STORE_TYPE_UNSPECIFIED" - Unspecified data store type. + // "SITE_SEARCH" - The parent data store contains a site search + // engine. + // "STRUCTURED" - The parent data store contains a search engine for + // structured data. + // "UNSTRUCTURED" - The parent data store contains a search engine for + // unstructured data. + // "BLENDED" - The parent data store is served for blended search with + // multiple data stores. + DataStoreType string `json:"dataStoreType,omitempty"` + + // DataStoreUiConfigs: Configurable UI configurations per data store. + DataStoreUiConfigs []*GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig `json:"dataStoreUiConfigs,omitempty"` + + // DisplayName: Required. The human readable widget config display name. + // Used in Discovery UI. This field must be a UTF-8 encoded string with + // a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // EnableAutocomplete: Whether or not to enable autocomplete. + EnableAutocomplete bool `json:"enableAutocomplete,omitempty"` + + // EnableConversationalSearch: Whether to allow conversational search + // (LLM, multi-turn) or not (non-LLM, single-turn). + EnableConversationalSearch bool `json:"enableConversationalSearch,omitempty"` + + // EnableQualityFeedback: Turn on or off collecting the search result + // quality feedback from end users. + EnableQualityFeedback bool `json:"enableQualityFeedback,omitempty"` + + // EnableResultScore: Whether to show the result score. + EnableResultScore bool `json:"enableResultScore,omitempty"` + + // EnableSafeSearch: Whether to enable safe search. + EnableSafeSearch bool `json:"enableSafeSearch,omitempty"` + + // EnableSearchAsYouType: Whether to enable search-as-you-type behavior + // for the search widget + EnableSearchAsYouType bool `json:"enableSearchAsYouType,omitempty"` + + // EnableSnippetResultSummary: Turn on or off summary for each snippets + // result. + EnableSnippetResultSummary bool `json:"enableSnippetResultSummary,omitempty"` + + // EnableSummarization: Turn on or off summarization for the search + // response. + EnableSummarization bool `json:"enableSummarization,omitempty"` + + // EnableWebApp: Whether to enable standalone web app. + EnableWebApp bool `json:"enableWebApp,omitempty"` + + // FacetField: The configuration and appearance of facets in the end + // user view. + FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` + + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, + // `custom3`. The value is the name of the field along with its device + // visibility. The 3 custom fields are optional and can be added or + // removed. `title`, `thumbnail`, `url` are required UI components that + // cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + + // IndustryVertical: Output only. The industry vertical that the + // WidgetConfig registers. The WidgetConfig industry vertical is based + // on the associated Engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // LlmEnabled: Output only. Whether LLM is enabled in the corresponding + // data store. + LlmEnabled bool `json:"llmEnabled,omitempty"` + + // MinimumDataTermAccepted: Output only. Whether the customer accepted + // data use terms. + MinimumDataTermAccepted bool `json:"minimumDataTermAccepted,omitempty"` + + // Name: Immutable. The full resource name of the widget config. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Name string `json:"name,omitempty"` - // Response: The normal, successful response of the operation. If the - // original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` + // ResultDisplayType: The type of snippet to display in UCS widget. - + // RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new + // non-enterprise search users. - EXTRACTIVE_ANSWER for new enterprise + // search users. + // + // Possible values: + // "RESULT_DISPLAY_TYPE_UNSPECIFIED" - Unspecified display type + // (default to showing snippet). + // "SNIPPET" - Display results from the snippet field. + // "EXTRACTIVE_ANSWER" - Display results from extractive answers + // field. + ResultDisplayType string `json:"resultDisplayType,omitempty"` + + // SolutionType: Required. Immutable. Specifies the solution type that + // this WidgetConfig can be used for. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the WidgetConfig was updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AllowPublicAccess") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AllowPublicAccess") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent: +// Read-only collection component that contains data store collections +// fields that may be used for filtering +type GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent struct { + // DataStoreComponents: For the data store collection, list of the + // children data stores. + DataStoreComponents []*GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent `json:"dataStoreComponents,omitempty"` + + // DisplayName: The display name of the collection. + DisplayName string `json:"displayName,omitempty"` + + // Id: Output only. the identifier of the collection, used for widget + // service. For now it refers to collection_id, in the future we will + // migrate the field to encrypted collection name UUID. + Id string `json:"id,omitempty"` + + // Name: The name of the collection. It should be collection resource + // name. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n_id}`. For APIs under WidgetService, such as LookUpWidgetConfig, the + // project number and location part is erased in this field. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataStoreComponents") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataStoreComponents") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigCollectionComponent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent: +// Read-only data store component that contains data stores fields that +// may be used for filtering, it's the child of `CollectionComponent`. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent struct { + // DisplayName: The display name of the data store. + DisplayName string `json:"displayName,omitempty"` + + // Id: Output only. the identifier of the data store, used for widget + // service. For now it refers to data_store_id, in the future we will + // migrate the field to encrypted data store name UUID. + Id string `json:"id,omitempty"` + + // Name: The name of the data store. It should be data store resource + // name Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such + // as LookUpWidgetConfig, the project number and location part is erased + // in this field. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreComponent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig: UI +// component configuration for data store. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig struct { + // FacetField: Facet fields that store the mapping of fields to end user + // widget appearance. + FacetField []*GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField `json:"facetField,omitempty"` + + // FieldsUiComponentsMap: The key is the UI component. Mock. Currently + // supported `title`, `thumbnail`, `url`, `custom1`, `custom2`, + // `custom3`. The value is the name of the field along with its device + // visibility. The 3 custom fields are optional and can be added or + // removed. `title`, `thumbnail`, `url` are required UI components that + // cannot be removed. + FieldsUiComponentsMap map[string]GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField `json:"fieldsUiComponentsMap,omitempty"` + + // Id: Output only. the identifier of the data store, used for widget + // service. For now it refers to data_store_id, in the future we will + // migrate the field to encrypted data store name UUID. + Id string `json:"id,omitempty"` + + // Name: The name of the data store. It should be data store resource + // name Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n_id}/dataStores/{data_store_id}`. For APIs under WidgetService, such + // as LookUpWidgetConfig, the project number and location part is erased + // in this field. + Name string `json:"name,omitempty"` + + // ForceSendFields is a list of field names (e.g. "FacetField") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "FacetField") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigDataStoreUiConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField: Facet fields +// that store the mapping of fields to end user widget appearance. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField struct { + // DisplayName: Optional. The field name that end users will see. + DisplayName string `json:"displayName,omitempty"` + + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigFacetField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField: Facet +// field that maps to a UI Component. +type GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField struct { + // DeviceVisibility: The field visibility on different types of devices. + // + // Possible values: + // "DEVICE_VISIBILITY_UNSPECIFIED" - Default value when not specified. + // Server returns INVALID_ARGUMENT if used in requests. + // "MOBILE" - The UI component is visible on Mobile devices. + // "DESKTOP" - The UI component is visible on Browser-based client. + DeviceVisibility []string `json:"deviceVisibility,omitempty"` + + // DisplayTemplate: The template to customize how the field is + // displayed. An example value would be a string that looks like: + // "Price: {value}". + DisplayTemplate string `json:"displayTemplate,omitempty"` + + // Field: Required. Registered field name. The format is `field.abc`. + Field string `json:"field,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DeviceVisibility") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DeviceVisibility") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConfigUIComponentField + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest: +// Request message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` + + // ConfigId: Required. The UUID of the WidgetConfig. This field is used + // to identify the widget configuration, set of models used to make the + // user event collection. + ConfigId string `json:"configId,omitempty"` + + // ConversationId: The id of the Conversation to get. Use "-" to + // activate auto session mode, which automatically creates a new + // conversation inside a ConverseConversation session. + ConversationId string `json:"conversationId,omitempty"` + + // ConverseConversationRequest: Required. The + // ConverseConversationRequest request to perform converse a + // conversation. The ServingConfig id will be `default_search` by + // default. + ConverseConversationRequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest `json:"converseConversationRequest,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse: +// Response message for WidgetService.WidgetConverseConversation method. +type GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse struct { + // ConversationId: The id of the Conversation returned. + ConversationId string `json:"conversationId,omitempty"` + + // ConverseConversationResponse: ConverseConversationResponse returned + // from ConversationalSearchService.ConverseConversation. + ConverseConversationResponse *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse `json:"converseConversationResponse,omitempty"` + + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ConversationId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConversationId") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest: Request message +// for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest struct { + // AdditionalParams: Additional params for security and privacy + // enhancement. + AdditionalParams *GoogleCloudDiscoveryengineV1alphaAdditionalParams `json:"additionalParams,omitempty"` + + // ConfigId: Required. The UUID of the Search WidgetConfig. This field + // is used to identify the search widget configuration, set of models + // used to make the search. + ConfigId string `json:"configId,omitempty"` + + // SearchRequest: Required. The search request to perform search. + SearchRequest *GoogleCloudDiscoveryengineV1alphaSearchRequest `json:"searchRequest,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AdditionalParams") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AdditionalParams") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse: Response +// message for WidgetService.WidgetSearch method. +type GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse struct { + // SearchResponse: The search response after performing search. + SearchResponse *GoogleCloudDiscoveryengineV1alphaSearchResponse `json:"searchResponse,omitempty"` + + // UToken: The token in response. + UToken string `json:"uToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "SearchResponse") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SearchResponse") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: +// Response message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetSites") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetSites") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.CreateTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1betaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If + // this field is unset, the server behavior defaults to + // ContentConfig.NO_CONTENT. + // + // Possible values: + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "NO_CONTENT" - Only contains documents without any + // Document.content. + // "CONTENT_REQUIRED" - Only contains documents with Document.content. + // "PUBLIC_WEBSITE" - The data store is used for public website + // search. + ContentConfig string `json:"contentConfig,omitempty"` + + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` + + // DefaultSchemaId: Output only. The id of the default Schema + // asscociated to this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + + // DisplayName: Required. The data store display name. This field must + // be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + + // IndustryVertical: Immutable. The industry vertical that the data + // store registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * + // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. + // Other solutions cannot be enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionTypes []string `json:"solutionTypes,omitempty"` + + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDataStore + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.DeleteDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata +// related to the progress of the EngineService.DeleteEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.DeleteTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: +// Response message for +// SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` + + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` + + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// +// Related configurations applied to a specific type of document +// +// parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` + + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigD +// igitalParsingConfig: The digital parsing configurations for +// documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigO +// crParsingConfig: The OCR parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: +// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { +} + +// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the +// training and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1betaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable + // if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + + // ChatEngineMetadata: Output only. Additional information of the Chat + // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + + // CommonConfig: Common config spec that specifies the metadata of the + // engine. + CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` + + // CreateTime: Output only. Timestamp the Recommendation Engine was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of + // engines, they can only associate with at most one data store. If + // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same + // Collection can be associated here. Note that when used in + // CreateEngineRequest, one DataStore id must be provided as the system + // will use it for necessary initializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + + // DisplayName: Required. The display name of the engine. Should be + // human readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + + // IndustryVertical: The industry vertical that the engine registers. + // The restriction of the Engine industry vertical is based on + // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine + // has to match vertical of the DataStore liniked to the engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The fully qualified resource name of the engine. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n}/engines/{engine}` engine should be 1-63 characters, and valid + // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is + // returned. + Name string `json:"name,omitempty"` + + // SearchEngineConfig: Configurations for the Search Engine. Only + // applicable if solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChatEngineConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: +// Configurations for a Chat Engine. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent + // that is associated to this Engine. Note that these configurations are + // one-time consumed by and passed to Dialogflow service. It means they + // cannot be retrieved using EngineService.GetEngine or + // EngineService.ListEngines API after engine creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` + + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent + // to link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that + // links the agent with the Chat engine. Format: + // `projects//locations//agents/`. Note that the + // `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using + // EngineService.GetEngine or EngineService.ListEngines API after engine + // creation. Please use ChatEngineMetadata.dialogflow_agent for actual + // agent association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AgentCreationConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationCon +// fig: Configurations for generating a Dialogflow agent. Note that +// these configurations are one-time consumed by and passed to +// Dialogflow service. It means they cannot be retrieved using +// EngineService.GetEngine or EngineService.ListEngines API after engine +// creation. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` + + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a + // list of the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + + // Location: Agent location for Agent creation, supported values: + // global/us/eu. If not provided, us Engine will create Agent using + // us-central-1 by default; eu Engine will create Agent using eu-west-1 + // by default. + Location string `json:"location,omitempty"` + + // TimeZone: Required. The time zone of the agent from the time zone + // database (https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Business") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Business") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this + // Chat Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DialogflowAgent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// 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 string `json:"companyName,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CompanyName") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CompanyName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: +// Configurations for a Search Engine. +type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` + + // SearchTier: The search feature tier of this engine. Different tiers + // might have different pricing. To learn more, please check the pricing + // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not + // specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SearchAddOns") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` + + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadat +// a: Metadata related to the progress of the +// ImportSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRespons +// e: Response message for +// CompletionService.ImportSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // FailedEntriesCount: Count of deny list entries that failed to be + // imported. + FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` + + // ImportedEntriesCount: Count of deny list entries successfully + // imported. + ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` + + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` + + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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 default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata +// : Metadata related to the progress of the +// PurgeSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse +// : Response message for +// CompletionService.PurgeSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // PurgeCount: Number of suggestion deny list entries purged. + PurgeCount int64 `json:"purgeCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` + + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "JsonSchema") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the + // ownership and validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification + // failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website + // that opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SiteVerificationState") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1betaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated + // to include all pages whose address contains the provided_uri_pattern. + // If set to true, an uri_pattern is generated to try to be an exact + // match of the provided_uri_pattern or just the specific page if the + // provided_uri_pattern is a specific one. provided_uri_pattern is + // always normalized to generate the URI pattern to be used by the + // search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` + + // GeneratedUriPattern: Output only. This is system-generated based on + // the provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be + // picked up by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to + // be deleted. This is a transitioning state which will resulted in + // either: 1. target site deleted if unindexing is successful; 2. state + // reverts to SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + + // Name: Output only. The fully qualified resource name of the target + // site. + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + + // ProvidedUriPattern: Required. Input only. The user provided URI + // pattern from which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + + // SiteVerificationInfo: Output only. Site ownership and validity + // verification status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + + // Type: The type of the target site, e.g., whether the site is to be + // included or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server + // behavior defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The target site's last updated time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QuotaFailure") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: +// Failed due to insufficient quota. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total + // quota this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TotalRequiredQuota") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata +// related to the progress of the TrainCustomModel operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of +// the TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + + // ModelStatus: The trained model status. Possible values are: * + // **bad-data**: The training data quality is bad. * **no-improvement**: + // Tuning didn't improve performance. Won't deploy. * **in-progress**: + // Model training job creation is in progress. * **training**: Model is + // actively training. * **evaluating**: The model is evaluating trained + // metrics. * **indexing**: The model trained metrics are indexing. * + // **ready**: The model is ready for serving. + ModelStatus string `json:"modelStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune + // applies to. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion_id}/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.UpdateTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "discoveryengine.locations.lookupWidgetConfig": + +type LocationsLookupWidgetConfigCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// LookupWidgetConfig: Gets the Widget Config using the uuid. +// +// - location: The location resource where lookup widget will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) LookupWidgetConfig(location string, googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) *LocationsLookupWidgetConfigCall { + c := &LocationsLookupWidgetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest = googleclouddiscoveryenginev1alphalookupwidgetconfigrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *LocationsLookupWidgetConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsLookupWidgetConfigCall) Context(ctx context.Context) *LocationsLookupWidgetConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsLookupWidgetConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/lookupWidgetConfig") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.lookupWidgetConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the Widget Config using the uuid.", + // "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.lookupWidgetConfig", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/lookupWidgetConfig", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetCompleteQuery": + +type LocationsWidgetCompleteQueryCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetCompleteQuery: Performs a user input completion with keyword +// suggestion. Similar to the CompletionService.CompleteQuery method, +// but a widget version that allows CompleteQuery without API Key. It +// supports CompleteQuery with or without JWT token. +// +// - location: The location resource where widget complete query will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetCompleteQuery(location string, googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) *LocationsWidgetCompleteQueryCall { + c := &LocationsWidgetCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest = googleclouddiscoveryenginev1alphawidgetcompletequeryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *LocationsWidgetCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetCompleteQueryCall) Context(ctx context.Context) *LocationsWidgetCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetCompleteQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetCompleteQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetCompleteQuery", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetCompleteQuery", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetConverseConversation": + +type LocationsWidgetConverseConversationCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetConverseConversation: Converse a conversation with Widget. +// +// - location: The location resource where widget converse conversation +// will be performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { + c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetConverseConversationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetConverseConversation") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetConverseConversation" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S +// erverResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Converse a conversation with Widget.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetConverseConversation", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetConverseConversation", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.locations.widgetSearch": + +type LocationsWidgetSearchCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// WidgetSearch: Performs a search. Similar to the SearchService.Search +// method, but a widget version that allows search without API Key. It +// supports search with or without JWT token. +// +// - location: The location resource where widget search will be +// performed. Format: `locations/{location}`. +func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { + c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *LocationsWidgetSearchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetsearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetSearch") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.locations.widgetSearch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", + // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.locations.widgetSearch", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "location": "path", + // "pattern": "^locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}/widgetSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.estimateDataSize": + +type ProjectsLocationsEstimateDataSizeCall struct { + s *Service + location string + googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EstimateDataSize: Estimates the data size to be used by a customer. +// +// - location: Full resource name of the location, such as +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { + c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaestimatedatasizerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}:estimateDataSize") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "location": c.location, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.estimateDataSize" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Estimates the data size to be used by a customer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}:estimateDataSize", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.estimateDataSize", + // "parameterOrder": [ + // "location" + // ], + // "parameters": { + // "location": { + // "description": "Required. Full resource name of the location, such as `projects/{project}/locations/{location}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+location}:estimateDataSize", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.getAclConfig": + +type ProjectsLocationsGetAclConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetAclConfig: Gets the AclConfig. +// +// - name: Resource name of AclConfig, such as +// `projects/*/locations/*/aclConfig`. If the caller does not have +// permission to access the AclConfig, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsGetAclConfigCall { + c := &ProjectsLocationsGetAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGetAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAclConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsGetAclConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAclConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGetAclConfigCall) Context(ctx context.Context) *ProjectsLocationsGetAclConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGetAclConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGetAclConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.getAclConfig" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the AclConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.getAclConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of AclConfig, such as `projects/*/locations/*/aclConfig`. If the caller does not have permission to access the AclConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.updateAclConfig": + +type ProjectsLocationsUpdateAclConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateAclConfig: Default Acl Configuration for use in a location of a +// customer's project. Updates will only reflect to new data stores. +// Existing data stores will still use the old value. +// +// - name: Immutable. The full resource name of the acl configuration. +// Format: `projects/{project}/locations/{location}/aclConfig`. This +// field must be a UTF-8 encoded string with a length limit of 1024 +// characters. +func (r *ProjectsLocationsService) UpdateAclConfig(name string, googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig) *ProjectsLocationsUpdateAclConfigCall { + c := &ProjectsLocationsUpdateAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaaclconfig = googleclouddiscoveryenginev1alphaaclconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateAclConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsUpdateAclConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateAclConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsUpdateAclConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsUpdateAclConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaaclconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.updateAclConfig" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.updateAclConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataConnector.operations.get": + +type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataConnector.operations.list": + +type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataConnector.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/[^/]+/dataConnector$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": + +type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword +// suggestions. +// +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions +// generated from the past history of SearchService.Search API calls. Do +// not use it when there is no traffic for Search API. * `user-event` - +// Using suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+dataStore}:completeQuery", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.create": + +type ProjectsLocationsCollectionsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { + c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/dataStores", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.delete": + +type ProjectsLocationsCollectionsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.get": + +type ProjectsLocationsCollectionsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { + c := &ProjectsLocationsCollectionsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig": + +type ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// +// - name: Full DocumentProcessingConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. +func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c := &ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/documentProcessingConfig", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/documentProcessingConfig$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine": + +type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.list": + +type ProjectsLocationsCollectionsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStores under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { + c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/dataStores", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.dataStores.patch": + +type ProjectsLocationsCollectionsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { + c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a DataStore", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.trainCustomModel": + +type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { + s *Service + dataStore string + googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TrainCustomModel: Trains a custom model. +// +// - dataStore: The resource name of the Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. This field is used to identify the data +// store where to train the models. +func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1alphatraincustommodelrequest = googleclouddiscoveryenginev1alphatraincustommodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatraincustommodelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:trainCustomModel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Trains a custom model.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+dataStore}:trainCustomModel", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +} - // ForceSendFields is a list of field names (e.g. "Done") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// method id "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig": - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +type ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. +// DocumentProcessingConfig is a singleon resource of DataStore. It's +// empty when DataStore is created. The first call to this method will +// set up DocumentProcessingConfig. +// +// - name: The full resource name of the Document Processing Config. +// Format: +// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin +// gConfig`. +func (r *ProjectsLocationsCollectionsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + c := &ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig + return c } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DocumentProcessingConfig to update. The +// following are the only supported fields: * +// DocumentProcessingConfig.ocr_config If not set, all supported fields +// are updated. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + c.urlParams_.Set("updateMask", updateMask) + return c } -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` - - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { + c.ctx_ = ctx + return c } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` - - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` - - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Day") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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) } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +// Do executes the "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/documentProcessingConfig", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/documentProcessingConfig$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "discoveryengine.locations.lookupWidgetConfig": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": -type LocationsLookupWidgetConfigCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// LookupWidgetConfig: Gets the Widget Config using the uuid. +// Create: Creates a Document. // -// - location: The location resource where lookup widget will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) LookupWidgetConfig(location string, googleclouddiscoveryenginev1alphalookupwidgetconfigrequest *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest) *LocationsLookupWidgetConfigCall { - c := &LocationsLookupWidgetConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest = googleclouddiscoveryenginev1alphalookupwidgetconfigrequest +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *LocationsLookupWidgetConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14057,21 +19162,21 @@ func (c *LocationsLookupWidgetConfigCall) Fields(s ...googleapi.Field) *Location // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LocationsLookupWidgetConfigCall) Context(ctx context.Context) *LocationsLookupWidgetConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LocationsLookupWidgetConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14079,14 +19184,14 @@ func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphalookupwidgetconfigrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/lookupWidgetConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14094,22 +19199,21 @@ func (c *LocationsLookupWidgetConfigCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.lookupWidgetConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse or error +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14128,7 +19232,7 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14140,28 +19244,171 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo } return ret, nil // { - // "description": "Gets the Widget Config using the uuid.", - // "flatPath": "v1alpha/locations/{locationsId}/lookupWidgetConfig", + // "description": "Creates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", // "httpMethod": "POST", - // "id": "discoveryengine.locations.lookupWidgetConfig", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", // "parameterOrder": [ - // "location" + // "parent" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where lookup widget will be performed. Format: `locations/{location}`", + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/lookupWidgetConfig", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaLookupWidgetConfigResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14170,95 +19417,103 @@ func (c *LocationsLookupWidgetConfigCall) Do(opts ...googleapi.CallOption) (*Goo } -// method id "discoveryengine.locations.widgetCompleteQuery": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": -type LocationsWidgetCompleteQueryCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// WidgetCompleteQuery: Performs a user input completion with keyword -// suggestion. Similar to the CompletionService.CompleteQuery method, -// but a widget version that allows CompleteQuery without API Key. It -// supports CompleteQuery with or without JWT token. +// Get: Gets a Document. // -// - location: The location resource where widget complete query will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetCompleteQuery(location string, googleclouddiscoveryenginev1alphawidgetcompletequeryrequest *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest) *LocationsWidgetCompleteQueryCall { - c := &LocationsWidgetCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest = googleclouddiscoveryenginev1alphawidgetcompletequeryrequest +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LocationsWidgetCompleteQueryCall) Fields(s ...googleapi.Field) *LocationsWidgetCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LocationsWidgetCompleteQueryCall) Context(ctx context.Context) *LocationsWidgetCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LocationsWidgetCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetcompletequeryrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetCompleteQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetCompleteQuery" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14277,7 +19532,7 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14289,28 +19544,25 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } return ret, nil // { - // "description": "Performs a user input completion with keyword suggestion. Similar to the CompletionService.CompleteQuery method, but a widget version that allows CompleteQuery without API Key. It supports CompleteQuery with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetCompleteQuery", - // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetCompleteQuery", + // "description": "Gets a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget complete query will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetCompleteQuery", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14319,92 +19571,134 @@ func (c *LocationsWidgetCompleteQueryCall) Do(opts ...googleapi.CallOption) (*Go } -// method id "discoveryengine.locations.widgetConverseConversation": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument": -type LocationsWidgetConverseConversationCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// WidgetConverseConversation: Converse a conversation with Widget. +// GetProcessedDocument: Gets the parsed layout information for a +// Document. // -// - location: The location resource where widget converse conversation -// will be performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetConverseConversation(location string, googleclouddiscoveryenginev1alphawidgetconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest) *LocationsWidgetConverseConversationCall { - c := &LocationsWidgetConverseConversationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest = googleclouddiscoveryenginev1alphawidgetconverseconversationrequest +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ProcessedDocumentFormat sets the optional parameter +// "processedDocumentFormat": What format output should be. If +// unspecified, defaults to JSON. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. +// "JSON" - output format will be a JSON string representation of +// +// processed document. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) + return c +} + +// ProcessedDocumentType sets the optional parameter +// "processedDocumentType": Required. What type of processing to return. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. +// "PARSED_DOCUMENT" - Available for all data store parsing configs. +// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabeld on +// +// the data store. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentType", processedDocumentType) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LocationsWidgetConverseConversationCall) Fields(s ...googleapi.Field) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LocationsWidgetConverseConversationCall) Context(ctx context.Context) *LocationsWidgetConverseConversationCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LocationsWidgetConverseConversationCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetConverseConversationCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetconverseconversationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetConverseConversation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetConverseConversation" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse.S -// erverResponse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaProcessedDocument or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.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 *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14423,7 +19717,7 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14435,28 +19729,53 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } return ret, nil // { - // "description": "Converse a conversation with Widget.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetConverseConversation", - // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetConverseConversation", + // "description": "Gets the parsed layout information for a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}:getProcessedDocument", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument", // "parameterOrder": [ - // "location" + // "name" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget converse conversation will be performed. Format: `locations/{location}`", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" + // }, + // "processedDocumentFormat": { + // "description": "What format output should be. If unspecified, defaults to JSON.", + // "enum": [ + // "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED", + // "JSON" + // ], + // "enumDescriptions": [ + // "Default value.", + // "output format will be a JSON string representation of processed document." + // ], + // "location": "query", + // "type": "string" + // }, + // "processedDocumentType": { + // "description": "Required. What type of processing to return.", + // "enum": [ + // "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED", + // "PARSED_DOCUMENT", + // "CHUNKED_DOCUMENT" + // ], + // "enumDescriptions": [ + // "Default value.", + // "Available for all data store parsing configs.", + // "Only available if ChunkingConfig is enabeld on the data store." + // ], + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetConverseConversation", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationRequest" - // }, + // "path": "v1alpha/{+name}:getProcessedDocument", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaProcessedDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14465,34 +19784,36 @@ func (c *LocationsWidgetConverseConversationCall) Do(opts ...googleapi.CallOptio } -// method id "discoveryengine.locations.widgetSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": -type LocationsWidgetSearchCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WidgetSearch: Performs a search. Similar to the SearchService.Search -// method, but a widget version that allows search without API Key. It -// supports search with or without JWT token. +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. // -// - location: The location resource where widget search will be -// performed. Format: `locations/{location}`. -func (r *LocationsService) WidgetSearch(location string, googleclouddiscoveryenginev1alphawidgetsearchrequest *GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest) *LocationsWidgetSearchCall { - c := &LocationsWidgetSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphawidgetsearchrequest = googleclouddiscoveryenginev1alphawidgetsearchrequest +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14500,21 +19821,21 @@ func (c *LocationsWidgetSearchCall) Fields(s ...googleapi.Field) *LocationsWidge // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *LocationsWidgetSearchCall) Context(ctx context.Context) *LocationsWidgetSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *LocationsWidgetSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14522,14 +19843,14 @@ func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphawidgetsearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}/widgetSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -14537,21 +19858,19 @@ func (c *LocationsWidgetSearchCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.locations.widgetSearch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14570,7 +19889,7 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14582,28 +19901,28 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } return ret, nil // { - // "description": "Performs a search. Similar to the SearchService.Search method, but a widget version that allows search without API Key. It supports search with or without JWT token.", - // "flatPath": "v1alpha/locations/{locationsId}/widgetSearch", + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", // "httpMethod": "POST", - // "id": "discoveryengine.locations.widgetSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", // "parameterOrder": [ - // "location" + // "parent" // ], // "parameters": { - // "location": { - // "description": "Required. The location resource where widget search will be performed. Format: `locations/{location}`", + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", // "location": "path", - // "pattern": "^locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}/widgetSearch", + // "path": "v1alpha/{+parent}/documents:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaWidgetSearchResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14612,89 +19931,124 @@ func (c *LocationsWidgetSearchCall) Do(opts ...googleapi.CallOption) (*GoogleClo } -// method id "discoveryengine.projects.locations.estimateDataSize": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": -type ProjectsLocationsEstimateDataSizeCall struct { - s *Service - location string - googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// EstimateDataSize: Estimates the data size to be used by a customer. +// List: Gets a list of Documents. // -// - location: Full resource name of the location, such as -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EstimateDataSize(location string, googleclouddiscoveryenginev1alphaestimatedatasizerequest *GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest) *ProjectsLocationsEstimateDataSizeCall { - c := &ProjectsLocationsEstimateDataSizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googleclouddiscoveryenginev1alphaestimatedatasizerequest = googleclouddiscoveryenginev1alphaestimatedatasizerequest +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsEstimateDataSizeCall) Fields(s ...googleapi.Field) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsEstimateDataSizeCall) Context(ctx context.Context) *ProjectsLocationsEstimateDataSizeCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsEstimateDataSizeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEstimateDataSizeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaestimatedatasizerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+location}:estimateDataSize") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "location": c.location, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.estimateDataSize" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14713,7 +20067,7 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14725,28 +20079,36 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Estimates the data size to be used by a customer.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}:estimateDataSize", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.estimateDataSize", + // "description": "Gets a list of Documents.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", // "parameterOrder": [ - // "location" + // "parent" // ], // "parameters": { - // "location": { - // "description": "Required. Full resource name of the location, such as `projects/{project}/locations/{location}`.", + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+location}:estimateDataSize", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeRequest" - // }, + // "path": "v1alpha/{+parent}/documents", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14755,80 +20117,110 @@ func (c *ProjectsLocationsEstimateDataSizeCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.getAclConfig": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsGetAclConfigCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetAclConfig: Gets the AclConfig. +// Patch: Updates a Document. // -// - name: Resource name of AclConfig, such as -// `projects/*/locations/*/aclConfig`. If the caller does not have -// permission to access the AclConfig, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsService) GetAclConfig(name string) *ProjectsLocationsGetAclConfigCall { - c := &ProjectsLocationsGetAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided imported 'document' to update. If not set, +// will by default update all fields. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsGetAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsGetAclConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetAclConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsGetAclConfigCall) Context(ctx context.Context) *ProjectsLocationsGetAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsGetAclConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGetAclConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -14839,16 +20231,16 @@ func (c *ProjectsLocationsGetAclConfigCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.getAclConfig" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14867,7 +20259,7 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14879,25 +20271,39 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G } return ret, nil // { - // "description": "Gets the AclConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.getAclConfig", + // "description": "Updates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. Resource name of AclConfig, such as `projects/*/locations/*/aclConfig`. If the caller does not have permission to access the AclConfig, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14906,36 +20312,39 @@ func (c *ProjectsLocationsGetAclConfigCall) Do(opts ...googleapi.CallOption) (*G } -// method id "discoveryengine.projects.locations.updateAclConfig": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": -type ProjectsLocationsUpdateAclConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateAclConfig: Default Acl Configuration for use in a location of a -// customer's project. Updates will only reflect to new data stores. -// Existing data stores will still use the old value. +// 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: Immutable. The full resource name of the acl configuration. -// Format: `projects/{project}/locations/{location}/aclConfig`. This -// field must be a UTF-8 encoded string with a length limit of 1024 -// characters. -func (r *ProjectsLocationsService) UpdateAclConfig(name string, googleclouddiscoveryenginev1alphaaclconfig *GoogleCloudDiscoveryengineV1alphaAclConfig) *ProjectsLocationsUpdateAclConfigCall { - c := &ProjectsLocationsUpdateAclConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaaclconfig = googleclouddiscoveryenginev1alphaaclconfig +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsUpdateAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14943,21 +20352,21 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsUpdateAclConfigCall) Context(ctx context.Context) *ProjectsLocationsUpdateAclConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsUpdateAclConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsUpdateAclConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14965,36 +20374,34 @@ func (c *ProjectsLocationsUpdateAclConfigCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaaclconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.updateAclConfig" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaAclConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaAclConfig.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAclConfig, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15013,7 +20420,7 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaAclConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15025,28 +20432,28 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Default Acl Configuration for use in a location of a customer's project. Updates will only reflect to new data stores. Existing data stores will still use the old value.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/aclConfig", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.updateAclConfig", + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. The full resource name of the acl configuration. Format: `projects/{project}/locations/{location}/aclConfig`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/aclConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/documents:purge", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaAclConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15055,9 +20462,9 @@ func (c *ProjectsLocationsUpdateAclConfigCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.collections.dataConnector.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get": -type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15066,13 +20473,17 @@ type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Document. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Chunk, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}/chunks/ +// {chunk}`. If the caller does not have permission to access the +// Chunk, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. If the requested Chunk does +// not exist, a `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15080,7 +20491,7 @@ func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15090,7 +20501,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s .. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15098,21 +20509,21 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15138,14 +20549,15 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaChunk or error will +// be non-nil. 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 *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15164,7 +20576,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaChunk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15176,25 +20588,25 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations/{operationsId}", + // "description": "Gets a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks/{chunksId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full resource name of Chunk, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+/chunks/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15203,45 +20615,47 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataConnector.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list": -type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Gets a list of Chunks. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent document resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to list Chunks under this +// document, regardless of whether or not this document exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// Chunks to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token +// ListChunksResponse.next_page_token, received from a previous +// ChunkService.ListChunks call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to +// ChunkService.ListChunks must match the call that provided the page +// token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15249,7 +20663,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15259,7 +20673,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s . // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.ifNoneMatch_ = entityTag return c } @@ -15267,21 +20681,21 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15294,7 +20708,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest( 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}/chunks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15302,20 +20716,21 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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.dataConnector.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListChunksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15334,7 +20749,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15346,41 +20761,36 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations", + // "description": "Gets a list of Chunks.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "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.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "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.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent document resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/chunks", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListChunksResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15392,7 +20802,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -15410,83 +20820,32 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx } } -// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": -type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service - dataStore string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions -// generated from the past history of SearchService.Search API calls. Do -// not use it when there is no traffic for Search API. * `user-event` - -// Using suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15496,7 +20855,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15504,21 +20863,21 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15531,7 +20890,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -15539,22 +20898,19 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15573,7 +20929,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15585,45 +20941,25 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", - // "location": "query", - // "type": "boolean" - // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", - // "location": "query", - // "type": "string" - // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:completeQuery", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15632,111 +20968,119 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.create": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": -type ProjectsLocationsCollectionsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To -// serve these documents for Search, or Recommendation use case, an -// Engine needs to be created separately. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { - c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15755,7 +21099,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15767,38 +21111,41 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15807,34 +21154,59 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.collections.dataStores.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": + +type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Converse: Converses a conversation. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15842,21 +21214,21 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15864,11 +21236,16 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -15879,14 +21256,17 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15905,7 +21285,7 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15917,25 +21297,28 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.delete", + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "description": "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15944,102 +21327,93 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.collections.dataStores.get": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": -type ProjectsLocationsCollectionsDataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a DataStore. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { - c := &ProjectsLocationsCollectionsDataStoresGetCall{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/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } 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.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16058,7 +21432,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16070,25 +21444,28 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.get", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "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/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16097,24 +21474,24 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": -type ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall 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 } -// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - name: Full DocumentProcessingConfig resource name. Format: +// - name: The resource name of the Conversation to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. -func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { - c := &ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection}/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 } @@ -16122,54 +21499,41 @@ func (r *ProjectsLocationsCollectionsDataStoresService) GetDocumentProcessingCon // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -16180,17 +21544,14 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16209,7 +21570,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16221,25 +21582,25 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) } return ret, nil // { - // "description": "Gets a DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.getDocumentProcessingConfig", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + // "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/[^/]+/dataStores/[^/]+/documentProcessingConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16248,9 +21609,9 @@ func (c *ProjectsLocationsCollectionsDataStoresGetDocumentProcessingConfigCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": -type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16259,15 +21620,13 @@ type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. -// -// - name: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Get: Gets a Conversation. +// +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -16275,7 +21634,7 @@ func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16285,7 +21644,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -16293,21 +21652,21 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16333,16 +21692,16 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16361,7 +21720,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16373,25 +21732,25 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "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/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16400,9 +21759,9 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.list": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": -type ProjectsLocationsCollectionsDataStoresListCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -16411,42 +21770,47 @@ type ProjectsLocationsCollectionsDataStoresListCall struct { header_ http.Header } -// List: Lists all the DataStores associated with the project. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. If the caller does not have permission to list DataStores under -// this location, regardless of whether or not this data store exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { - c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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": Filter by solution type. -// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { +// 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 -// DataStores to return. If unspecified, defaults to 10. The maximum -// allowed value is 50. Values above 50 will be coerced to 50. If this -// field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { +// 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 -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { +// 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 } @@ -16454,7 +21818,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16464,7 +21828,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -16472,21 +21836,21 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16499,7 +21863,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -16512,17 +21876,17 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16541,7 +21905,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16553,41 +21917,46 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "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 DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "description": "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 ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16599,7 +21968,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -16617,34 +21986,38 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Conte } } -// method id "discoveryengine.projects.locations.collections.dataStores.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": -type ProjectsLocationsCollectionsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { - c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DataStore to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { +// 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 } @@ -16652,7 +22025,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16660,21 +22033,21 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16682,7 +22055,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } @@ -16702,16 +22075,16 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16730,7 +22103,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16742,23 +22115,23 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.patch", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "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" @@ -16766,10 +22139,10 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16778,91 +22151,97 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.collections.dataStores.trainCustomModel": +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": -type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { - s *Service - dataStore string - googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TrainCustomModel: Trains a custom model. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - dataStore: The resource name of the Data Store, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. This field is used to identify the data -// store where to train the models. -func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1alphatraincustommodelrequest *GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { - c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - c.googleclouddiscoveryenginev1alphatraincustommodelrequest = googleclouddiscoveryenginev1alphatraincustommodelrequest +// - 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 } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatraincustommodelrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:trainCustomModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16893,26 +22272,23 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... } return ret, nil // { - // "description": "Trains a custom model.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:trainCustomModel", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -16923,274 +22299,119 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": -type ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. -// DocumentProcessingConfig is a singleon resource of DataStore. It's -// empty when DataStore is created. The first call to this method will -// set up DocumentProcessingConfig. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The full resource name of the Document Processing Config. -// Format: -// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin -// gConfig`. -func (r *ProjectsLocationsCollectionsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c := &ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 - c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DocumentProcessingConfig to update. The -// following are the only supported fields: * -// DocumentProcessingConfig.ocr_config If not set, all supported fields -// are updated. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall { - c.ctx_ = ctx return c } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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.updateDocumentProcessingConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.updateDocumentProcessingConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/documentProcessingConfig$", - // "required": true, - // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" - // }, - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": - -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a Document. -// -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) return c } -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17209,7 +22430,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17221,33 +22442,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17256,27 +22485,45 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": + +type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -17284,41 +22531,54 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17329,14 +22589,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 { @@ -17355,7 +22615,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o 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, @@ -17367,25 +22627,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17394,9 +22654,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -17405,25 +22665,42 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall 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 Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name 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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17433,7 +22710,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields( // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -17441,21 +22718,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneM // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17468,7 +22745,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque 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 { @@ -17481,16 +22758,15 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17509,7 +22785,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17521,25 +22797,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17548,134 +22840,121 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument": - -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall 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 *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// GetProcessedDocument: Gets the parsed layout information for a -// Document. -// -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": + +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ProcessedDocumentFormat sets the optional parameter -// "processedDocumentFormat": What format output should be. If -// unspecified, defaults to JSON. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. -// "JSON" - output format will be a JSON string representation of +// Create: Creates a Schema. // -// processed document. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// ProcessedDocumentType sets the optional parameter -// "processedDocumentType": Required. What type of processing to return. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. -// "PARSED_DOCUMENT" - Available for all data store parsing configs. -// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabeld on -// -// the data store. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentType", processedDocumentType) +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") 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.branches.documents.getProcessedDocument" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaProcessedDocument or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17694,7 +22973,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17706,53 +22985,33 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu } return ret, nil // { - // "description": "Gets the parsed layout information for a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}:getProcessedDocument", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.getProcessedDocument", + // "description": "Creates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "processedDocumentFormat": { - // "description": "What format output should be. If unspecified, defaults to JSON.", - // "enum": [ - // "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED", - // "JSON" - // ], - // "enumDescriptions": [ - // "Default value.", - // "output format will be a JSON string representation of processed document." - // ], - // "location": "query", - // "type": "string" - // }, - // "processedDocumentType": { - // "description": "Required. What type of processing to return.", - // "enum": [ - // "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED", - // "PARSED_DOCUMENT", - // "CHUNKED_DOCUMENT" - // ], - // "enumDescriptions": [ - // "Default value.", - // "Available for all data store parsing configs.", - // "Only available if ChunkingConfig is enabeld on the data store." - // ], + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+name}:getProcessedDocument", + // "path": "v1alpha/{+parent}/schemas", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaProcessedDocument" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17761,36 +23020,31 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetProcessedDocu } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - 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 } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// Delete: Deletes a Schema. // -// - parent: The parent branch resource name, such as +// - name: The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// taStores/{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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17798,21 +23052,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17820,34 +23074,29 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRe } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 { @@ -17878,26 +23127,23 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", + // "description": "Deletes a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -17908,56 +23154,32 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasGetCall 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 a Schema. // -// - parent: The parent branch resource name, such as +// - name: The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// taStores/{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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17967,7 +23189,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -17975,21 +23197,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNone // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18002,7 +23224,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18010,22 +23232,20 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18044,7 +23264,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18056,36 +23276,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Gets a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "name": { + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18094,130 +23303,118 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - 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 } -// Patch: Updates a Document. +// List: Gets a list of Schemas. // -// - name: Immutable. The full resource name of the document. Format: +// - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided imported 'document' to update. If not set, -// will by default update all fields. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H +// eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18236,7 +23433,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18248,39 +23445,36 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", + // "description": "Gets a list of Schemas.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "pageSize": { + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", // "location": "query", - // "type": "boolean" + // "type": "integer" // }, - // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", - // "required": true, + // "pageToken": { + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "location": "query", // "type": "string" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", - // "format": "google-fieldmask", - // "location": "query", + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" - // }, + // "path": "v1alpha/{+parent}/schemas", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18289,39 +23483,64 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.patch": + +type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + 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. +// Patch: Updates a Schema. // -// - parent: The parent resource name, such as +// - name: Immutable. The full resource name of the schema, in the +// format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18329,21 +23548,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18351,34 +23570,34 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18409,25 +23628,30 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", + // "description": "Updates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:purge", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -18439,9 +23663,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18450,17 +23674,13 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall struct header_ http.Header } -// Get: Gets a Document. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Full resource name of Chunk, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}/chunks/ -// {chunk}`. If the caller does not have permission to access the -// Chunk, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. If the requested Chunk does -// not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The 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 } @@ -18468,7 +23688,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) G // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18478,7 +23698,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -18486,21 +23706,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) I // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18526,15 +23746,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) d return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaChunk or error will -// be non-nil. 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 +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaChunk, 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 { @@ -18553,7 +23772,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18565,25 +23784,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) D } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks/{chunksId}", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Chunk, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+/chunks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18592,47 +23811,45 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksGetCall) D } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Chunks. +// 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 document resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to list Chunks under this -// document, regardless of whether or not this document exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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 } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Chunks to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +// Filter sets the optional parameter "filter": 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": A page token -// ListChunksResponse.next_page_token, received from a previous -// ChunkService.ListChunks call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// ChunkService.ListChunks must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -18640,7 +23857,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18650,7 +23867,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -18658,21 +23875,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18685,7 +23902,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18693,21 +23910,20 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListChunksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18726,7 +23942,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18738,36 +23954,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) } return ret, nil // { - // "description": "Gets a list of Chunks.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.chunks.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", // "parameterOrder": [ - // "parent" + // "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/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "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.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "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.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent document resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/chunks", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListChunksResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18779,7 +24000,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -18797,97 +24018,97 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsChunksListCall) } } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + 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. +// Answer: Answer query method. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/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) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") 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.branches.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18906,7 +24127,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18918,25 +24139,28 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", + // "description": "Answer query method.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:answer", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18945,9 +24169,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18956,42 +24180,22 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{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 } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19001,7 +24205,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -19009,21 +24213,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNon // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19036,7 +24240,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19049,15 +24253,16 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19076,7 +24281,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19088,41 +24293,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19131,119 +24320,116 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": + +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": +// List: Lists all ServingConfigs linked to this dataStore. +// +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Converse: Converses a conversation. -// -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "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.servingConfigs.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR -// esponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19262,7 +24448,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19274,28 +24460,36 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "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.", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" - // }, + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19304,34 +24498,64 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": + +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + 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. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19339,21 +24563,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19361,36 +24585,36 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header // or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19409,7 +24633,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19421,28 +24645,34 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19451,32 +24681,43 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19484,21 +24725,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19506,29 +24747,36 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19547,7 +24795,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19559,25 +24807,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "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}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19586,99 +24837,99 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": -type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Conversation. +// Search: Performs a search. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header +// +// or (if a response was returned at all) in +// // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19697,7 +24948,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19709,25 +24960,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "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}`", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19736,113 +24990,94 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } +} -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.create": + +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// Create: Creates a Session. If the Session to create already exists, +// an ALREADY_EXISTS error is returned. // -// - parent: The data store resource name. Format: +// - parent: Full resource name of parent data store. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - 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) + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } @@ -19853,17 +25088,16 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19882,7 +25116,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19894,46 +25128,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+parent}/sessions", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19942,67 +25158,32 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.delete": -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - 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 } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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 - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20010,21 +25191,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20032,16 +25213,11 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -20052,16 +25228,14 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20080,7 +25254,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20092,34 +25266,25 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20128,9 +25293,9 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.get": -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20139,13 +25304,13 @@ type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. -// -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Get: Gets a Session. +// +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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 } @@ -20153,7 +25318,7 @@ func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20163,7 +25328,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -20171,21 +25336,21 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20211,14 +25376,16 @@ 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20237,7 +25404,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20249,25 +25416,25 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "description": "Gets a Session.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20276,45 +25443,58 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.list": -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists all Sessions by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `session_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +// 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 } @@ -20322,7 +25502,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20332,7 +25512,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields( // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -20340,21 +25520,21 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneM // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20367,7 +25547,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20375,20 +25555,21 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doReque } 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20407,7 +25588,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20419,41 +25600,46 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListSessions` 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/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/sessions", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20465,7 +25651,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -20483,79 +25669,82 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(c } } -// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.patch": -type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Patch: Updates a Session. Session action type cannot be changed. If +// the Session to update does not exist, a NOT_FOUND error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/sessions/*`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession + return c +} + +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -20566,14 +25755,16 @@ 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20592,7 +25783,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20604,25 +25795,34 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20631,9 +25831,9 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get": -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20642,42 +25842,22 @@ 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 Answer. // -// - 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 Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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 *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 information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20687,7 +25867,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ifNoneMatch_ = entityTag return c } @@ -20695,21 +25875,21 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20722,7 +25902,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20735,15 +25915,15 @@ 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswer or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20762,7 +25942,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20774,41 +25954,25 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", + // "description": "Gets a Answer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20817,64 +25981,36 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. +// This API sends all the target sites under site search engine for +// verification. // -// - parent: The parent data store resource name, in the format of +// - parent: The parent resource shared by all TargetSites being +// verified. // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c -} - -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) + c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20882,21 +26018,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20904,14 +26040,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20924,14 +26060,14 @@ 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.siteSearchEngine.batchVerifyTargetSites" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) 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 { @@ -20962,30 +26098,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } return ret, nil // { - // "description": "Creates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" - // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", + // "path": "v1alpha/{+parent}:batchVerifyTargetSites", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -20997,31 +26128,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to +// basic site search. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21029,21 +26164,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21051,29 +26186,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) 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 { @@ -21104,23 +26244,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } return ret, nil // { - // "description": "Deletes a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", + // "description": "Downgrade from advanced site search to basic site search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -21131,98 +26274,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced +// site search. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, 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 { @@ -21241,7 +26378,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21253,25 +26390,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", + // "description": "Upgrade from basic site search to advanced site search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21280,43 +26420,47 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": -type ProjectsLocationsCollectionsDataStoresSchemasListCall 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 Schemas. +// FetchDomainVerificationStatus: Returns list of target sites with its +// domain verification status. This method can only be called under data +// store with BASIC_SITE_SEARCH state at the moment. // -// - parent: The parent data store resource name, in the format of +// - siteSearchEngine: The site search engine resource under which we +// fetch all the domain verification status. // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine return c } -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +// 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 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 { +// 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 } @@ -21324,7 +26468,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 information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21334,7 +26478,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } @@ -21342,21 +26486,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21369,7 +26513,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, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21377,21 +26521,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons +// e or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons +// e.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21410,7 +26555,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21422,36 +26567,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", // "parameterOrder": [ - // "parent" + // "siteSearchEngine" // ], // "parameters": { // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", + // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "siteSearchEngine": { + // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", + // "path": "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21463,7 +26608,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(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -21481,43 +26626,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// RecrawlUris: Request on-demand recrawl for a list of URIs. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine` +// . +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) RecrawlUris(siteSearchEngine string, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21525,21 +26661,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21547,34 +26683,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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 { @@ -21605,30 +26741,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", + // "description": "Request on-demand recrawl for a list of URIs.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -21640,9 +26771,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21656,8 +26787,8 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -21665,7 +26796,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 information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21675,7 +26806,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields( // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -21683,21 +26814,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneM // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21723,14 +26854,14 @@ 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.siteSearchEngine.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) 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 { @@ -21762,9 +26893,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", // "parameterOrder": [ // "name" // ], @@ -21772,7 +26903,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -21788,9 +26919,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -21804,29 +26935,29 @@ type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { // `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 *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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21834,7 +26965,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 information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21844,7 +26975,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -21852,21 +26983,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNone // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21892,7 +27023,7 @@ 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.siteSearchEngine.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -21900,7 +27031,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequ // a response was returned 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21932,9 +27063,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", // "parameterOrder": [ // "name" // ], @@ -21947,7 +27078,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // }, @@ -21977,7 +27108,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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -21995,100 +27126,237 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages( } } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": -type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the -// ServingConfig does not exist. +// BatchCreate: Creates TargetSite in a batch. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource shared by all TargetSites being +// created. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this +// field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates TargetSite in a batch.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+parent}/targetSites:batchCreate", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + 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}/da +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } 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.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22107,7 +27375,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22119,25 +27387,28 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. } return ret, nil // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", + // "description": "Creates a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + // "parent": { + // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/targetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22146,116 +27417,87 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": -type ProjectsLocationsCollectionsDataStoresServingConfigsListCall 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 } -// List: Lists all ServingConfigs linked to this dataStore. +// Delete: Deletes a TargetSite. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 100. If a value -// greater than 100 is provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListServingConfigs` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes -// ponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22274,7 +27516,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22286,36 +27528,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", + // "description": "Deletes a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + // "name": { + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/servingConfigs", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22324,103 +27555,83 @@ 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(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": -type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - 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 } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Get: Gets a TargetSite. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided ServingConfig to update. The following are NOT -// supported: * ServingConfig.name If not set, all supported fields are -// updated. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -22431,16 +27642,16 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaTargetSite or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22459,7 +27670,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22471,34 +27682,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", + // "description": "Gets a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22507,102 +27709,123 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - 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 } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// List: Gets a list of TargetSites. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - parent: The parent site search engine resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to list TargetSites under this site search engine, +// regardless of whether or not this branch exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": 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 information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.ServerRespon +// se.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22621,7 +27844,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22633,28 +27856,36 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", + // "description": "Gets a list of TargetSites.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" - // }, + // "path": "v1alpha/{+parent}/targetSites", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22663,38 +27894,56 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Patch: Updates a TargetSite. // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: Output only. The fully qualified resource name of the target +// site. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` +// The `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22702,21 +27951,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22724,38 +27973,34 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header -// -// or (if a response was returned at all) in -// -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22774,7 +28019,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22786,28 +28031,28 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", + // "description": "Updates a TargetSite.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22816,114 +28061,97 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest - 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 } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. -// This API sends all the target sites under site search engine for -// verification. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The parent resource shared by all TargetSites being -// verified. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest = googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchverifytargetsitesrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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 { @@ -22954,26 +28182,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } return ret, nil // { - // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}:batchVerifyTargetSites", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchVerifyTargetSitesRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -22984,92 +28209,119 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to -// basic site search. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadisableadvancedsitesearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23088,7 +28340,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23100,28 +28352,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } return ret, nil // { - // "description": "Downgrade from advanced site search to basic site search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", // "parameterOrder": [ - // "siteSearchEngine" + // "name" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:disableAdvancedSiteSearch", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchRequest" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23130,35 +28395,54 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": + +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced -// site search. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23166,21 +28450,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23188,14 +28472,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaenableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23203,19 +28487,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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 { @@ -23246,25 +28530,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } return ret, nil // { - // "description": "Upgrade from basic site search to advanced site search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "description": "Imports all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "parent": { + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:enableAdvancedSiteSearch", + // "path": "v1alpha/{+parent}/suggestionDenyListEntries:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -23276,123 +28560,91 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchDomainVerificationStatus: Returns list of target sites with its -// domain verification status. This method can only be called under data -// store with BASIC_SITE_SEARCH state at the moment. +// Purge: Permanently deletes all SuggestionDenyListEntry for a +// DataStore. // -// - siteSearchEngine: The site search engine resource under which we -// fetch all the domain verification status. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - return c -} - -// PageSize sets the optional parameter "pageSize": 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) +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons -// e or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusRespons -// e.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23411,7 +28663,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23423,36 +28675,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } return ret, nil // { - // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", + // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "siteSearchEngine": { - // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "parent": { + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:fetchDomainVerificationStatus", + // "path": "v1alpha/{+parent}/suggestionDenyListEntries:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23461,112 +28705,125 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaFetchDomainVerificationStatusResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": + +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": +// Collect: Writes a single user event from the browser. This uses a GET +// request to due to browser restriction of POST-ing to a third-party +// domain. This method is used only by the Discovery Engine API +// JavaScript pixel and Google Tag Manager. Users should not call this +// method directly. +// +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 } -// 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, googleclouddiscoveryenginev1alpharecrawlurisrequest *GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1alpharecrawlurisrequest = googleclouddiscoveryenginev1alpharecrawlurisrequest +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) + return c +} + +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecrawlurisrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23585,7 +28842,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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, @@ -23597,28 +28854,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } return ret, nil // { - // "description": "Request on-demand recrawl for a list of URIs.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", + // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", + // "location": "query", + // "type": "string" + // }, + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+siteSearchEngine}:recrawlUris", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest" - // }, + // "path": "v1alpha/{+parent}/userEvents:collect", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23627,97 +28897,95 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Import: Bulk import of 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 name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23748,23 +29016,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", + // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -23775,119 +29046,94 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Purge: Deletes permanently all user events specified by the filter +// provided. Depending on the number of events specified by the filter, +// this operation could take hours or days to complete. To test a +// filter, use the list command first. // -// - name: The name of the operation'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) +// - parent: The resource name of the catalog under which the events are +// created. The format is +// `projects/${projectId}/locations/global/collections/{$collectionId}/ +// dataStores/${dataStoreId}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23906,7 +29152,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23918,41 +29164,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", + // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "parent": { + // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/userEvents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23961,57 +29194,33 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Write: Writes a single user event. // -// - parent: The parent resource shared by all TargetSites being -// created. +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this -// field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest + c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24019,21 +29228,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24041,14 +29250,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24061,14 +29270,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24087,7 +29298,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24099,28 +29310,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } return ret, nil // { - // "description": "Creates TargetSite in a batch.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "description": "Writes a single user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/targetSites:batchCreate", + // "path": "v1alpha/{+parent}/userEvents:write", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24129,33 +29340,42 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": +// method id "discoveryengine.projects.locations.collections.engines.create": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Create: Creates a Engine. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { + c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// EngineId sets the optional parameter "engineId": Required. The ID to +// use for the Engine, which will become the final component of the +// Engine's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24163,21 +29383,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24185,14 +29405,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -24205,14 +29425,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24243,25 +29463,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } return ret, nil // { - // "description": "Creates a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "description": "Creates a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", + // "id": "discoveryengine.projects.locations.collections.engines.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "engineId": { + // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/targetSites", + // "path": "v1alpha/{+parent}/engines", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -24273,9 +29498,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": +// method id "discoveryengine.projects.locations.collections.engines.delete": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24283,17 +29508,16 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall header_ http.Header } -// Delete: Deletes a TargetSite. +// Delete: Deletes a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. If the caller does not have permission to +// delete the Engine, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the Engine to delete does +// not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24301,7 +29525,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24309,21 +29533,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24346,14 +29570,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24384,18 +29608,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } return ret, nil // { - // "description": "Deletes a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "description": "Deletes a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", + // "id": "discoveryengine.projects.locations.collections.engines.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } @@ -24411,9 +29635,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": +// method id "discoveryengine.projects.locations.collections.engines.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24422,17 +29646,13 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall st header_ http.Header } -// Get: Gets a TargetSite. +// Get: Gets a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24440,7 +29660,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24450,7 +29670,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -24458,21 +29678,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24498,16 +29718,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaTargetSite or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaTargetSite.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaTargetSite, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24526,7 +29745,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaTargetSite{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24538,25 +29757,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } return ret, nil // { - // "description": "Gets a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "description": "Gets a Engine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", + // "id": "discoveryengine.projects.locations.collections.engines.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24565,9 +29784,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": +// method id "discoveryengine.projects.locations.collections.engines.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsCollectionsEnginesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24576,36 +29795,32 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall s header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists all the Engines associated with the project. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to list TargetSites under this site search engine, -// regardless of whether or not this branch exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListTargetSites` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListTargetSites` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24613,7 +29828,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24623,7 +29838,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { c.ifNoneMatch_ = entityTag return c } @@ -24631,21 +29846,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24658,7 +29873,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24671,17 +29886,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse.ServerRespon -// se.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListEnginesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.H +// eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24700,7 +29914,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24712,36 +29926,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } return ret, nil // { - // "description": "Gets a list of TargetSites.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "description": "Lists all the Engines associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", + // "id": "discoveryengine.projects.locations.collections.engines.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "filter": { + // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "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.", + // "description": "Optional. Not supported.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", + // "description": "Optional. Not supported.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/targetSites", + // "path": "v1alpha/{+parent}/engines", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24753,7 +29972,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListTargetSitesResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -24771,35 +29990,45 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": +// method id "discoveryengine.projects.locations.collections.engines.patch": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Patch: Updates an Engine // -// - name: Output only. The fully qualified resource name of the target -// site. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` -// The `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1alphatargetsite *GoogleCloudDiscoveryengineV1alphaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The fully qualified resource name of the engine. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}` engine should be 1-63 characters, and valid +// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphatargetsite = googleclouddiscoveryenginev1alphatargetsite + c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Engine to update. If an unsupported or unknown +// field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24807,21 +30036,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24829,7 +30058,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) if err != nil { return nil, err } @@ -24849,14 +30078,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24875,7 +30105,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24887,28 +30117,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } return ret, nil // { - // "description": "Updates a TargetSite.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "description": "Updates an Engine", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", + // "id": "discoveryengine.projects.locations.collections.engines.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24917,79 +30153,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.pause": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapauseenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:pause") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25000,14 +30230,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25026,7 +30257,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25038,25 +30269,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", + // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.pause", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:pause", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25065,100 +30299,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.resume": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Resume: Resumes the training of an existing engine. Only applicable +// if SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - 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) +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { + c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) 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 *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharesumeenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25169,15 +30376,15 @@ 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25196,7 +30403,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25208,41 +30415,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", + // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.resume", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}:resume", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25251,54 +30445,34 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": +// method id "discoveryengine.projects.locations.collections.engines.tune": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25306,21 +30480,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) 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 *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25328,14 +30502,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatuneenginerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:tune") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25343,19 +30517,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25386,25 +30560,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } return ret, nil // { - // "description": "Imports all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", + // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", + // "id": "discoveryengine.projects.locations.collections.engines.tune", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/suggestionDenyListEntries:import", + // "path": "v1alpha/{+name}:tune", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -25416,34 +30590,38 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": +// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Permanently deletes all SuggestionDenyListEntry for a -// DataStore. +// Converse: Converses a conversation. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25451,21 +30629,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25473,14 +30651,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgesuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -25488,19 +30666,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR +// esponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25519,7 +30700,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25531,28 +30712,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } return ret, nil // { - // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/suggestionDenyListEntries:purge", + // "path": "v1alpha/{+name}:converse", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25561,107 +30742,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": +// method id "discoveryengine.projects.locations.collections.engines.conversations.create": -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{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) + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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 *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -25672,14 +30819,16 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25698,7 +30847,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25710,41 +30859,28 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } return ret, nil // { - // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "ets": { - // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. 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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" - // }, - // "uri": { - // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", - // "location": "query", - // "type": "string" - // }, - // "userEvent": { - // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:collect", + // "path": "v1alpha/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25753,38 +30889,32 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": +// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: 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. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1alphaimportusereventsrequest *GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportusereventsrequest = googleclouddiscoveryenginev1alphaimportusereventsrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -25792,21 +30922,21 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) 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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -25814,34 +30944,29 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportusereventsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("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.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -25860,7 +30985,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25872,28 +30997,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } return ret, nil // { - // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25902,94 +31024,99 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.purge": +// method id "discoveryengine.projects.locations.collections.engines.conversations.get": -type ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Purge: Deletes permanently all user events specified by the filter -// provided. Depending on the number of events specified by the filter, -// this operation could take hours or days to complete. To test a -// filter, use the list command first. +// Get: Gets a Conversation. // -// - parent: The resource name of the catalog under which the events are -// created. The format is -// `projects/${projectId}/locations/global/collections/{$collectionId}/ -// dataStores/${dataStoreId}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgeusereventsrequest *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphapurgeusereventsrequest = googleclouddiscoveryenginev1alphapurgeusereventsrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgeusereventsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26008,7 +31135,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26020,28 +31147,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } return ret, nil // { - // "description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.purge", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26050,72 +31174,113 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsPurgeCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": +// method id "discoveryengine.projects.locations.collections.engines.conversations.list": -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent - 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 } -// Write: Writes a single user event. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1alphauserevent *GoogleCloudDiscoveryengineV1alphaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphauserevent = googleclouddiscoveryenginev1alphauserevent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *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 information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphauserevent) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/userEvents:write") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/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 } @@ -26126,16 +31291,17 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaUserEvent or error +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaUserEvent.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaUserEvent, error) { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26154,7 +31320,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaUserEvent{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26166,28 +31332,46 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } return ret, nil // { - // "description": "Writes a single user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.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 parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/userEvents:write", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" - // }, + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaUserEvent" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26196,42 +31380,67 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": + +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsEnginesService) Create(parent string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesCreateCall { - c := &ProjectsLocationsCollectionsEnginesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } -// 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) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26239,21 +31448,21 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) 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 *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26261,34 +31470,36 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26307,7 +31518,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26319,33 +31530,34 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.create", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "engineId": { - // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/engines", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26354,26 +31566,24 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.delete": +// method id "discoveryengine.projects.locations.collections.engines.operations.get": -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// 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} -// /engines/{engine_id}`. If the caller does not have permission to -// delete the Engine, regardless of whether or not it exists, a -// PERMISSION_DENIED error is returned. If the Engine to delete does -// not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -26381,41 +31591,54 @@ 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 information. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -26426,14 +31649,14 @@ 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.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26464,18 +31687,18 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.delete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -26491,9 +31714,9 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.get": +// method id "discoveryengine.projects.locations.collections.engines.operations.list": -type ProjectsLocationsCollectionsEnginesGetCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -26502,21 +31725,42 @@ type ProjectsLocationsCollectionsEnginesGetCall struct { header_ http.Header } -// Get: Gets a Engine. +// 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 Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26526,7 +31770,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -26534,21 +31778,21 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26561,7 +31805,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26574,15 +31818,15 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if +// *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 *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26601,7 +31845,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26612,26 +31856,42 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp return nil, err } return ret, nil - // { - // "description": "Gets a Engine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // { + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.get", + // "id": "discoveryengine.projects.locations.collections.engines.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + // "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": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26640,118 +31900,118 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } -// method id "discoveryengine.projects.locations.collections.engines.list": - -type ProjectsLocationsCollectionsEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the Engines associated with the project. -// -// - 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 +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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 -} +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.answer": -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Answer: Answer query method. +// +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/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) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListEnginesResponse +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse // or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListEnginesResponse.ServerResponse.H +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.H // eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListEnginesResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26770,7 +32030,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListEnginesResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26782,41 +32042,28 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists all the Engines associated with the project.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.list", + // "description": "Answer query method.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:answer", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.answer", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Not supported.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Not supported.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/engines", + // "path": "v1alpha/{+servingConfig}:answer", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListEnginesResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26825,105 +32072,80 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.patch": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: Immutable. The fully qualified resource name of the engine. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. Format: +// - name: The resource name of the ServingConfig to get. Format: // `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}` engine should be 1-63 characters, and valid -// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1alphaengine *GoogleCloudDiscoveryengineV1alphaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaengine = googleclouddiscoveryenginev1alphaengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Engine to update. If an unsupported or unknown -// field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaengine) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -26934,15 +32156,16 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26961,7 +32184,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26973,34 +32196,25 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates an Engine", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.patch", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27009,92 +32223,116 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.pause": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": -type ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// List: Lists all ServingConfigs linked to this dataStore. // -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1alphapauseenginerequest *GoogleCloudDiscoveryengineV1alphaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphapauseenginerequest = googleclouddiscoveryenginev1alphapauseenginerequest +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{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 information. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapauseenginerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27113,7 +32351,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27125,28 +32363,36 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.pause", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:pause", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPauseEngineRequest" - // }, + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27155,34 +32401,64 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.resume": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": + +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes the training of an existing engine. Only applicable -// if SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1alpharesumeenginerequest *GoogleCloudDiscoveryengineV1alphaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alpharesumeenginerequest = googleclouddiscoveryenginev1alpharesumeenginerequest + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27190,21 +32466,21 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27212,16 +32488,16 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharesumeenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -27232,15 +32508,16 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27259,7 +32536,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27271,28 +32548,34 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.resume", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}:resume", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaResumeEngineRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27301,34 +32584,43 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.tune": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": -type ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1alphatuneenginerequest *GoogleCloudDiscoveryengineV1alphaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphatuneenginerequest = googleclouddiscoveryenginev1alphatuneenginerequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27336,21 +32628,21 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27358,14 +32650,14 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphatuneenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:tune") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27373,19 +32665,21 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27404,7 +32698,7 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27416,28 +32710,28 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.tune", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:tune", + // "path": "v1alpha/{+servingConfig}:recommend", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaTuneEngineRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27446,38 +32740,38 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } -// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Search: Performs a search. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27485,21 +32779,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27507,14 +32801,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27522,22 +32816,23 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR -// esponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header +// +// or (if a response was returned at all) in +// // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27556,7 +32851,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27568,28 +32863,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "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.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", + // "path": "v1alpha/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27598,34 +32893,55 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.engines.conversations.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken + } +} -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.sessions.create": + +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + 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. +// 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/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27633,21 +32949,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27655,14 +32971,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27675,16 +32991,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27703,7 +33019,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27715,10 +33031,10 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.create", // "parameterOrder": [ // "parent" // ], @@ -27731,12 +33047,12 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+parent}/sessions", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27745,9 +33061,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": +// method id "discoveryengine.projects.locations.collections.engines.sessions.delete": -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27755,14 +33071,14 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: +// - name: The resource name of the Session to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection}/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 } @@ -27770,7 +33086,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27778,21 +33094,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27815,14 +33131,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +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 { @@ -27853,18 +33169,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.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 Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } @@ -27880,9 +33196,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.get": +// method id "discoveryengine.projects.locations.collections.engines.sessions.get": -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -27891,13 +33207,13 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Session. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Session to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection}/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 } @@ -27905,7 +33221,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 information. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27915,7 +33231,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -27923,21 +33239,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27963,16 +33279,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27991,7 +33307,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28003,25 +33319,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "description": "Gets a Session.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.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 Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28030,9 +33346,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.engines.conversations.list": +// method id "discoveryengine.projects.locations.collections.engines.sessions.list": -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -28041,13 +33357,13 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -28055,7 +33371,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent st // Filter sets the optional parameter "filter": A filter to apply on the // list results. The supported features are: user_pseudo_id, state. // Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -28063,9 +33379,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter // OrderBy sets the optional parameter "orderBy": A comma-separated list // of fields to order by, sorted in ascending order. Use "desc" after a // field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" +// `create_time` * `session_name` Example: "update_time desc" // "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -28073,15 +33389,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(order // PageSize sets the optional parameter "pageSize": Maximum number of // results to return. If unspecified, defaults to 50. Max allowed value // is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to +// received from a previous `ListSessions` call. Provide this to // retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28089,7 +33405,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 information. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28099,7 +33415,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -28107,21 +33423,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28134,7 +33450,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28147,17 +33463,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28176,7 +33491,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28188,10 +33503,10 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.list", // "parameterOrder": [ // "parent" // ], @@ -28202,7 +33517,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "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": "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\"", // "location": "query", // "type": "string" // }, @@ -28213,7 +33528,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", + // "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, @@ -28225,9 +33540,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+parent}/sessions", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28239,7 +33554,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -28257,38 +33572,35 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx con } } -// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": +// method id "discoveryengine.projects.locations.collections.engines.sessions.patch": -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If +// the Session to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +// 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 } @@ -28296,46 +33608,206 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(u // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) 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 := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaSession{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.engines.sessions.answers.get": + +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Answer. +// +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id +// }`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -28346,16 +33818,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswer or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28374,7 +33845,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28386,34 +33857,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", + // "description": "Gets a Answer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}/answers/{answersId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.answers.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28422,9 +33884,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.operations.get": +// method id "discoveryengine.projects.locations.collections.operations.get": -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28438,8 +33900,8 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { // 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)} +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28447,7 +33909,7 @@ func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28457,7 +33919,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28465,21 +33927,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) 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 *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28505,14 +33967,14 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -28544,9 +34006,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.get", + // "id": "discoveryengine.projects.locations.collections.operations.get", // "parameterOrder": [ // "name" // ], @@ -28554,7 +34016,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -28570,9 +34032,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.engines.operations.list": +// method id "discoveryengine.projects.locations.collections.operations.list": -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28586,29 +34048,29 @@ type ProjectsLocationsCollectionsEnginesOperationsListCall struct { // `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)} +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +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 *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { +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 *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28616,7 +34078,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28626,7 +34088,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -28634,21 +34096,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) 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 *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28674,7 +34136,7 @@ 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.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -28682,7 +34144,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st // a response was returned 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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28714,9 +34176,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.list", + // "id": "discoveryengine.projects.locations.collections.operations.list", // "parameterOrder": [ // "name" // ], @@ -28729,7 +34191,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // }, @@ -28759,7 +34221,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 *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -28777,199 +34239,83 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": +// method id "discoveryengine.projects.locations.dataStores.completeQuery": -type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { +type ProjectsLocationsDataStoresCompleteQueryCall struct { s *Service - name string + dataStore string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the -// ServingConfig does not exist. +// CompleteQuery: Completes the specified user input with keyword +// suggestions. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{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 -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.ifNoneMatch_ = entityTag +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.ctx_ = ctx +// 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 } -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) 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 := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}", - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": - -type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all ServingConfigs linked to this dataStore. -// -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// 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 } -// 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)) +// 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 } -// 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) +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28979,7 +34325,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ... // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { c.ifNoneMatch_ = entityTag return c } @@ -28987,21 +34333,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29014,7 +34360,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29022,22 +34368,22 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(al } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "dataStore": c.dataStore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse +// .Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29056,7 +34402,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29068,36 +34414,45 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", + // "id": "discoveryengine.projects.locations.dataStores.completeQuery", // "parameterOrder": [ - // "parent" + // "dataStore" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", - // "format": "int32", + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", // "location": "query", - // "type": "integer" + // "type": "boolean" // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", - // "required": true, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/servingConfigs", + // "path": "v1alpha/{+dataStore}:completeQuery", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29106,64 +34461,54 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": +// method id "discoveryengine.projects.locations.dataStores.create": -type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// 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: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided 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) +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29171,21 +34516,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29193,36 +34538,34 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29241,7 +34584,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29253,34 +34596,38 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", - // "required": true, - // "type": "string" + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", - // "format": "google-fieldmask", + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/dataStores", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29289,43 +34636,34 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.dataStores.delete": -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Delete: Deletes a DataStore. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29333,21 +34671,21 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29355,36 +34693,29 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doReque } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("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.engines.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29403,7 +34734,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29415,28 +34746,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", + // "description": "Deletes a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.delete", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29445,99 +34773,102 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": +// method id "discoveryengine.projects.locations.dataStores.get": -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets a DataStore. // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header -// -// or (if a response was returned at all) in -// +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29556,7 +34887,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29568,28 +34899,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", + // "description": "Gets a DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29598,30 +34926,9 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - -// method id "discoveryengine.projects.locations.collections.operations.get": +// method id "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig": -type ProjectsLocationsCollectionsOperationsGetCall struct { +type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29630,13 +34937,13 @@ type ProjectsLocationsCollectionsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. // -// - 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 DocumentProcessingConfig resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. +func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -29644,7 +34951,7 @@ 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 information. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29654,7 +34961,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.ifNoneMatch_ = entityTag return c } @@ -29662,21 +34969,21 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) 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 *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29702,14 +35009,17 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29728,7 +35038,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29740,25 +35050,25 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", + // "description": "Gets a DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29767,9 +35077,9 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.operations.list": +// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": -type ProjectsLocationsCollectionsOperationsListCall struct { +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29778,42 +35088,23 @@ 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`. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - 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: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29823,7 +35114,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ifNoneMatch_ = entityTag return c } @@ -29831,21 +35122,21 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) 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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29858,7 +35149,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29871,15 +35162,16 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29898,7 +35190,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29910,41 +35202,25 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29953,104 +35229,61 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.dataStores.list": -type ProjectsLocationsDataStoresCompleteQueryCall struct { +type ProjectsLocationsDataStoresListCall struct { s *Service - dataStore string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// List: Lists all the DataStores associated with the project. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// - parent: The 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 } -// 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) +// 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 } -// 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) +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30060,7 +35293,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { c.ifNoneMatch_ = entityTag return c } @@ -30068,21 +35301,21 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) 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 *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30095,7 +35328,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30103,22 +35336,22 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse.ServerResponse -// .Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons +// e.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse, error) { +func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30137,7 +35370,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30149,45 +35382,41 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "id": "discoveryengine.projects.locations.dataStores.list", // "parameterOrder": [ - // "dataStore" + // "parent" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", // "location": "query", - // "type": "boolean" + // "type": "string" // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", // "location": "query", - // "type": "string" + // "type": "integer" // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "query", // "type": "string" // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+dataStore}:completeQuery", + // "path": "v1alpha/{+parent}/dataStores", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30196,54 +35425,63 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresCreateCall struct { +// method id "discoveryengine.projects.locations.dataStores.patch": + +type ProjectsLocationsDataStoresPatchCall struct { s *Service - parent string + name string googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To -// serve these documents for Search, or Recommendation use case, an -// Engine needs to be created separately. +// Patch: Updates a DataStore // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore return c } -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) - return c -} - -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30251,21 +35489,21 @@ func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30280,27 +35518,29 @@ func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Res reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30319,7 +35559,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30331,38 +35571,34 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.create", + // "description": "Updates a DataStore", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", + // "path": "v1alpha/{+name}", // "request": { // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30371,34 +35607,47 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.delete": +// method id "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig": -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. +// DocumentProcessingConfig is a singleon resource of DataStore. It's +// empty when DataStore is created. The first call to this method will +// set up DocumentProcessingConfig. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the Document Processing Config. +// Format: +// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin +// gConfig`. +func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DocumentProcessingConfig to update. The +// following are the only supported fields: * +// DocumentProcessingConfig.ocr_config If not set, all supported fields +// are updated. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30406,21 +35655,21 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30428,11 +35677,16 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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 } @@ -30443,14 +35697,17 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30469,7 +35726,7 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30481,25 +35738,34 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.delete", + // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30508,102 +35774,107 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.get": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": -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 + googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument + 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} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *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 the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *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) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or // (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30622,7 +35893,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30634,25 +35905,33 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.get", + // "description": "Creates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30661,24 +35940,27 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": -type ProjectsLocationsDataStoresGetDocumentProcessingConfigCall 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 } -// GetDocumentProcessingConfig: Gets a DocumentProcessingConfig. +// Delete: Deletes a Document. // -// - name: Full DocumentProcessingConfig resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/dataStores/{data_store_id}/documentProcessingConfig`. -func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresGetDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30686,54 +35968,41 @@ func (r *ProjectsLocationsDataStoresService) GetDocumentProcessingConfig(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -30744,17 +36013,14 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30773,7 +36039,7 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30785,25 +36051,25 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... } return ret, nil // { - // "description": "Gets a DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getDocumentProcessingConfig", + // "description": "Deletes a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full DocumentProcessingConfig resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`", + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30812,9 +36078,9 @@ func (c *ProjectsLocationsDataStoresGetDocumentProcessingConfigCall) Do(opts ... } -// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30823,15 +36089,17 @@ type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Get: Gets a Document. // -// - name: Resource name of SiteSearchEngine, such as +// - name: Full resource name of Document, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30839,7 +36107,7 @@ func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30849,7 +36117,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -30857,21 +36125,21 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30897,16 +36165,16 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaSiteSearchEngine.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSiteSearchEngine, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30925,7 +36193,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1alphaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30937,25 +36205,25 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "description": "Gets a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSiteSearchEngine" + // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30964,61 +36232,67 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.list": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument": -type ProjectsLocationsDataStoresListCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall 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. +// GetProcessedDocument: Gets the parsed layout information for 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) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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)) +// ProcessedDocumentFormat sets the optional parameter +// "processedDocumentFormat": What format output should be. If +// unspecified, defaults to JSON. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. +// "JSON" - output format will be a JSON string representation of +// +// processed document. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) 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) +// ProcessedDocumentType sets the optional parameter +// "processedDocumentType": Required. What type of processing to return. +// +// Possible values: +// +// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. +// "PARSED_DOCUMENT" - Available for all data store parsing configs. +// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabeld on +// +// the data store. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { + c.urlParams_.Set("processedDocumentType", processedDocumentType) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31028,7 +36302,7 @@ func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *Proj // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ifNoneMatch_ = entityTag return c } @@ -31036,21 +36310,21 @@ func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31063,7 +36337,7 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31071,22 +36345,21 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaProcessedDocument or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListDataStoresResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.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 *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31105,7 +36378,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDataStoresResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31117,41 +36390,53 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores", + // "description": "Gets the parsed layout information for a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}:getProcessedDocument", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.list", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", - // "location": "query", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "processedDocumentFormat": { + // "description": "What format output should be. If unspecified, defaults to JSON.", + // "enum": [ + // "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED", + // "JSON" + // ], + // "enumDescriptions": [ + // "Default value.", + // "output format will be a JSON string representation of processed document." + // ], // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", - // "required": true, + // "processedDocumentType": { + // "description": "Required. What type of processing to return.", + // "enum": [ + // "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED", + // "PARSED_DOCUMENT", + // "CHUNKED_DOCUMENT" + // ], + // "enumDescriptions": [ + // "Default value.", + // "Available for all data store parsing configs.", + // "Only available if ChunkingConfig is enabeld on the data store." + // ], + // "location": "query", // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/dataStores", + // "path": "v1alpha/{+name}:getProcessedDocument", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDataStoresResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaProcessedDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31160,63 +36445,36 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.patch": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest + 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 will be 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} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1alphadatastore *GoogleCloudDiscoveryengineV1alphaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadatastore = googleclouddiscoveryenginev1alphadatastore - 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}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31224,21 +36482,21 @@ func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *Pro // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *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 := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31246,36 +36504,34 @@ func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Resp } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadatastore) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDataStore.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDataStore, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31294,7 +36550,7 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDataStore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31306,34 +36562,28 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.patch", + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/documents:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDataStore" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31342,107 +36592,124 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": -type ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig - 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 } -// UpdateDocumentProcessingConfig: Updates the DocumentProcessingConfig. -// DocumentProcessingConfig is a singleon resource of DataStore. It's -// empty when DataStore is created. The first call to this method will -// set up DocumentProcessingConfig. +// List: Gets a list of Documents. // -// - name: The full resource name of the Document Processing Config. -// Format: -// `projects/*/locations/*/collections/*/dataStores/*/documentProcessin -// gConfig`. -func (r *ProjectsLocationsDataStoresService) UpdateDocumentProcessingConfig(name string, googleclouddiscoveryenginev1alphadocumentprocessingconfig *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c := &ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphadocumentprocessingconfig = googleclouddiscoveryenginev1alphadocumentprocessingconfig +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DocumentProcessingConfig to update. The -// following are the only supported fields: * -// DocumentProcessingConfig.ocr_config If not set, all supported fields -// are updated. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Context(ctx context.Context) *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocumentprocessingconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. // Exactly one of -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig.ServerRespo -// nse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse +// .Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31461,7 +36728,7 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31473,34 +36740,36 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts } return ret, nil // { - // "description": "Updates the DocumentProcessingConfig. DocumentProcessingConfig is a singleon resource of DataStore. It's empty when DataStore is created. The first call to this method will set up DocumentProcessingConfig.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/documentProcessingConfig", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.updateDocumentProcessingConfig", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/documentProcessingConfig$", - // "required": true, - // "type": "string" + // "description": "Gets a list of Documents.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DocumentProcessingConfig to update. The following are the only supported fields: * DocumentProcessingConfig.ocr_config If not set, all supported fields are updated.", - // "format": "google-fieldmask", + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" - // }, + // "path": "v1alpha/{+parent}/documents", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31509,48 +36778,71 @@ func (c *ProjectsLocationsDataStoresUpdateDocumentProcessingConfigCall) Do(opts } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { s *Service - parent string + name string googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Create: Creates a Document. +// Patch: Updates a Document. // -// - parent: The parent resource name, such as +// - name: Immutable. The full resource name of the document. Format: // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument return c } -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided imported 'document' to update. If not set, +// will by default update 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 information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31558,21 +36850,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31587,20 +36879,20 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. // Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either @@ -31609,7 +36901,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt s // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31640,28 +36932,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + // "description": "Updates a Document.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", // "location": "query", - // "type": "string" + // "type": "boolean" // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+name}", // "request": { // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" // }, @@ -31675,35 +36973,39 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes 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}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31711,21 +37013,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31733,29 +37035,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 { @@ -31774,7 +37081,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31786,25 +37093,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31813,9 +37123,9 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get": -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -31826,15 +37136,15 @@ type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { // Get: Gets a Document. // -// - name: Full resource name of Document, such as +// - name: Full resource name of Chunk, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{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 } @@ -31842,7 +37152,7 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31852,7 +37162,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { c.ifNoneMatch_ = entityTag return c } @@ -31860,21 +37170,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31900,16 +37210,15 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaChunk or error will +// be non-nil. 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 { @@ -31928,7 +37237,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaChunk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31941,24 +37250,24 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea return ret, nil // { // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks/{chunksId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "description": "Required. Full resource name of Chunk, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+/chunks/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31967,67 +37276,55 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list": -type ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetProcessedDocument: Gets the parsed layout information for a -// Document. +// List: Gets a list of Chunks. // -// - name: Full resource name of Document, such as +// - parent: The parent document resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da // taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) GetProcessedDocument(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 } -// ProcessedDocumentFormat sets the optional parameter -// "processedDocumentFormat": What format output should be. If -// unspecified, defaults to JSON. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED" - Default value. -// "JSON" - output format will be a JSON string representation of -// -// processed document. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentFormat(processedDocumentFormat string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentFormat", processedDocumentFormat) +// 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 } -// ProcessedDocumentType sets the optional parameter -// "processedDocumentType": Required. What type of processing to return. -// -// Possible values: -// -// "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED" - Default value. -// "PARSED_DOCUMENT" - Available for all data store parsing configs. -// "CHUNKED_DOCUMENT" - Only available if ChunkingConfig is enabeld on -// -// the data store. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) ProcessedDocumentType(processedDocumentType string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { - c.urlParams_.Set("processedDocumentType", processedDocumentType) +// 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 information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32037,7 +37334,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.ifNoneMatch_ = entityTag return c } @@ -32045,21 +37342,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) I // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32072,7 +37369,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) d var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:getProcessedDocument") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32080,21 +37377,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) d } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaProcessedDocument or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaProcessedDocument.ServerResponse.Hea -// der or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListChunksResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.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 *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaProcessedDocument, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32113,7 +37410,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) D if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaProcessedDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32125,53 +37422,36 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) D } return ret, nil // { - // "description": "Gets the parsed layout information for a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}:getProcessedDocument", + // "description": "Gets a list of Chunks.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.getProcessedDocument", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "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.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "processedDocumentFormat": { - // "description": "What format output should be. If unspecified, defaults to JSON.", - // "enum": [ - // "PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED", - // "JSON" - // ], - // "enumDescriptions": [ - // "Default value.", - // "output format will be a JSON string representation of processed document." - // ], + // "pageToken": { + // "description": "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.", // "location": "query", // "type": "string" // }, - // "processedDocumentType": { - // "description": "Required. What type of processing to return.", - // "enum": [ - // "PROCESSED_DOCUMENT_TYPE_UNSPECIFIED", - // "PARSED_DOCUMENT", - // "CHUNKED_DOCUMENT" - // ], - // "enumDescriptions": [ - // "Default value.", - // "Available for all data store parsing configs.", - // "Only available if ChunkingConfig is enabeld on the data store." - // ], - // "location": "query", + // "parent": { + // "description": "Required. The parent document resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:getProcessedDocument", + // "path": "v1alpha/{+parent}/chunks", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaProcessedDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListChunksResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32180,93 +37460,118 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetProcessedDocumentCall) D } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": + +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// 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}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1alphaimportdocumentsrequest *GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaimportdocumentsrequest = googleclouddiscoveryenginev1alphaimportdocumentsrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaimportdocumentsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, 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 { @@ -32297,26 +37602,23 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -32327,48 +37629,45 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsDataStoresBranchesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Gets a list of Documents. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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 } -// PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +// 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": 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 { +// 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 } @@ -32376,7 +37675,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32386,7 +37685,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -32394,21 +37693,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) 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 *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32421,7 +37720,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -32429,22 +37728,20 @@ 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. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse or error will +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudDiscoveryengineV1alphaListDocumentsResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse, error) { +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32463,7 +37760,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListDocumentsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32475,36 +37772,41 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", // "parameterOrder": [ - // "parent" + // "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": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListDocumentsResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32516,7 +37818,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListDocumentsResponse) error) error { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -32534,50 +37836,38 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context } } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": +// method id "discoveryengine.projects.locations.dataStores.conversations.converse": -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Document. +// Converse: Converses a conversation. // -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1alphadocument *GoogleCloudDiscoveryengineV1alphaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphadocument = googleclouddiscoveryenginev1alphadocument - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided imported 'document' to update. If not set, -// will by default update all fields. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32585,21 +37875,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32607,16 +37897,16 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -32627,16 +37917,17 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR +// esponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaDocument, error) { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32655,7 +37946,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaDocument{ + ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32667,39 +37958,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "description": "Converses a conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided imported 'document' to update. If not set, will by default update all fields.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}:converse", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32708,39 +37988,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": +// method id "discoveryengine.projects.locations.dataStores.conversations.create": -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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 Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1alphapurgedocumentsrequest *GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest) *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/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphapurgedocumentsrequest = googleclouddiscoveryenginev1alphapurgedocumentsrequest + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32748,21 +38023,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) 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 *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32770,14 +38045,14 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/documents:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32790,14 +38065,16 @@ 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32816,7 +38093,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32828,28 +38105,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", + // "id": "discoveryengine.projects.locations.dataStores.conversations.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/documents:purge", + // "path": "v1alpha/{+parent}/conversations", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32858,9 +38135,144 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get": +// method id "discoveryengine.projects.locations.dataStores.conversations.delete": -type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { +type ProjectsLocationsDataStoresConversationsDeleteCall 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/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.conversations.get": + +type ProjectsLocationsDataStoresConversationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -32869,17 +38281,13 @@ type ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall struct { header_ http.Header } -// Get: Gets a Document. +// Get: Gets a Conversation. // -// - name: Full resource name of Chunk, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}/chunks/ -// {chunk}`. If the caller does not have permission to access the -// Chunk, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. If the requested Chunk does -// not exist, a `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -32887,7 +38295,7 @@ func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -32897,7 +38305,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Fields(s ... // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -32905,21 +38313,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) IfNoneMatch( // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -32945,15 +38353,16 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaChunk or error will -// be non-nil. 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) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32972,7 +38381,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaChunk{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32984,25 +38393,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks/{chunksId}", + // "description": "Gets a Conversation.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.chunks.get", + // "id": "discoveryengine.projects.locations.dataStores.conversations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Chunk, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+/chunks/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaChunk" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33011,9 +38420,9 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksGetCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list": +// method id "discoveryengine.projects.locations.dataStores.conversations.list": -type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { +type ProjectsLocationsDataStoresConversationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -33022,36 +38431,47 @@ type ProjectsLocationsDataStoresBranchesDocumentsChunksListCall struct { header_ http.Header } -// List: Gets a list of Chunks. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent document resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to list Chunks under this -// document, regardless of whether or not this document exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsChunksService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsChunksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of -// 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 { +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListChunksResponse.next_page_token, received from a previous -// ChunkService.ListChunks call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to -// ChunkService.ListChunks must match the call that provided the page -// token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -33059,7 +38479,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) PageToken(p // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33069,7 +38489,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Fields(s .. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -33077,21 +38497,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) IfNoneMatch // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33104,7 +38524,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) doRequest(a var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/chunks") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -33117,16 +38537,17 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListChunksResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListChunksResponse.ServerResponse.He -// ader or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp +// onse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListChunksResponse, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33145,7 +38566,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListChunksResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33157,36 +38578,46 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... } return ret, nil // { - // "description": "Gets a list of Chunks.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}/chunks", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.chunks.list", + // "id": "discoveryengine.projects.locations.dataStores.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 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.", + // "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 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.", + // "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 parent document resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{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.", + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/chunks", + // "path": "v1alpha/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListChunksResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33198,7 +38629,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Do(opts ... // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListChunksResponse) error) error { +func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -33216,79 +38647,85 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsChunksListCall) Pages(ctx c } } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.dataStores.conversations.patch": -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) 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 *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -33299,14 +38736,16 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33325,7 +38764,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33337,25 +38776,34 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33364,9 +38812,9 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -33375,42 +38823,21 @@ type ProjectsLocationsDataStoresBranchesOperationsListCall 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 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's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -33420,7 +38847,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -33428,21 +38855,21 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) 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 *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -33455,7 +38882,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -33468,201 +38895,14 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningListOperationsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", - // "required": true, - // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" - // } - // }, - // "path": "v1alpha/{+name}/operations", - // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.converse": - -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Converse: Converses a conversation. -// -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1alphaconverseconversationrequest *GoogleCloudDiscoveryengineV1alphaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaconverseconversationrequest = googleclouddiscoveryenginev1alphaconverseconversationrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconverseconversationrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}:converse") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConverseConversationResponse.ServerR -// esponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33681,7 +38921,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConverseConversationResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33693,28 +38933,25 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConverseConversationResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33723,93 +38960,119 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.conversations.create": +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33828,7 +39091,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -33840,28 +39103,41 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "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/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -33870,24 +39146,45 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.operations.get": + +type ProjectsLocationsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// 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 delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -33895,41 +39192,54 @@ func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -33940,14 +39250,14 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33966,7 +39276,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap 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, @@ -33978,25 +39288,25 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", // "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": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34005,9 +39315,9 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.get": +// method id "discoveryengine.projects.locations.dataStores.operations.list": -type ProjectsLocationsDataStoresConversationsGetCall struct { +type ProjectsLocationsDataStoresOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34016,21 +39326,42 @@ type ProjectsLocationsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34040,7 +39371,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -34048,21 +39379,21 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34075,7 +39406,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -34088,16 +39419,15 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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 *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34116,7 +39446,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34128,25 +39458,41 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.get", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "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": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34155,134 +39501,121 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.dataStores.conversations.list": - -type ProjectsLocationsDataStoresConversationsListCall 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/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "discoveryengine.projects.locations.dataStores.schemas.create": -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Create: Creates a Schema. +// +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") 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, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaListConversationsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListConversationsResponse, error) { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34301,7 +39634,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListConversationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34313,46 +39646,33 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.list", + // "description": "Creates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.schemas.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", - // "location": "query", - // "type": "string" - // }, - // "orderBy": { - // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/conversations", + // "path": "v1alpha/{+parent}/schemas", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListConversationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34361,67 +39681,31 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.dataStores.schemas.delete": -type ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSchemasDeleteCall 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 Schema. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1alphaconversation *GoogleCloudDiscoveryengineV1alphaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1alphaconversation = googleclouddiscoveryenginev1alphaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34429,21 +39713,21 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleap // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34451,16 +39735,11 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaconversation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -34471,16 +39750,14 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaConversation or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34499,7 +39776,7 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaConversation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34511,34 +39788,25 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", + // "description": "Deletes a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaConversation" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34547,9 +39815,9 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } -// method id "discoveryengine.projects.locations.dataStores.models.operations.get": +// method id "discoveryengine.projects.locations.dataStores.schemas.get": -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -34558,13 +39826,13 @@ type ProjectsLocationsDataStoresModelsOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -34572,7 +39840,7 @@ func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34582,7 +39850,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googlea // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -34590,21 +39858,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityT // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34630,14 +39898,15 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34656,7 +39925,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34668,25 +39937,25 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", + // "description": "Gets a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.schemas.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34695,45 +39964,43 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.dataStores.schemas.list": -type ProjectsLocationsDataStoresModelsOperationsListCall struct { +type ProjectsLocationsDataStoresSchemasListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Gets a list of Schemas. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous SchemaService.ListSchemas call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to SchemaService.ListSchemas must match the call +// that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -34741,7 +40008,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -34751,7 +40018,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...google // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } @@ -34759,21 +40026,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entity // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -34786,7 +40053,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -34794,20 +40061,21 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34826,7 +40094,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34838,41 +40106,36 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "description": "Gets a list of Schemas.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.schemas.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+parent}/schemas", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -34884,7 +40147,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -34902,97 +40165,256 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context. } } -// method id "discoveryengine.projects.locations.dataStores.operations.get": +// method id "discoveryengine.projects.locations.dataStores.schemas.patch": + +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Schema. +// +// - name: Immutable. The full resource name of the schema, in the +// format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+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.schemas.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Schema.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.answer": -type ProjectsLocationsDataStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + 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. +// Answer: Answer query method. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/servingConfigs/default_serving_config`. This field is used to +// identify the serving configuration name, set of models used to make +// the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35011,7 +40433,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35023,25 +40445,28 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "description": "Answer query method.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.answer", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:answer", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35050,9 +40475,9 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.operations.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -35061,42 +40486,22 @@ type ProjectsLocationsDataStoresOperationsListCall struct { header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35106,7 +40511,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -35114,21 +40519,21 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35141,7 +40546,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -35154,15 +40559,16 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35181,7 +40587,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35193,41 +40599,25 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+name}/operations", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35236,103 +40626,95 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": -type ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// List: Lists all ServingConfigs linked to this dataStore. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -35343,14 +40725,17 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes +// ponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35369,7 +40754,7 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35381,33 +40766,36 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" - // }, + // "path": "v1alpha/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35416,31 +40804,64 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": + +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35448,21 +40869,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35470,11 +40891,16 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -35485,14 +40911,16 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35511,7 +40939,7 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35523,25 +40951,34 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1alpha/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35550,98 +40987,102 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": -type ProjectsLocationsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1alphaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSchema, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea +// der or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35660,7 +41101,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSchema{ + ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35672,25 +41113,28 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.get", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35699,118 +41143,99 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } -// method id "discoveryengine.projects.locations.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.search": -type ProjectsLocationsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// Search: Performs a search. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous SchemaService.ListSchemas call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to SchemaService.ListSchemas must match the call -// that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1alphaListSchemasResponse.ServerResponse.H -// eader or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header +// +// or (if a response was returned at all) in +// // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSchemasResponse, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35829,7 +41254,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35841,36 +41266,28 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.list", + // "description": "Performs a search.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.search", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/schemas", + // "path": "v1alpha/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -35882,9 +41299,9 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSchemasResponse) error) error { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -35896,47 +41313,38 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, if x.NextPageToken == "" { return nil } - c.PageToken(x.NextPageToken) + c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken } } -// method id "discoveryengine.projects.locations.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.dataStores.sessions.create": -type ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// Create: Creates a Session. If the Session to create already exists, +// an ALREADY_EXISTS error is returned. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1alphaschema *GoogleCloudDiscoveryengineV1alphaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaschema = googleclouddiscoveryenginev1alphaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsCreateCall { + c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -35944,21 +41352,21 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -35966,34 +41374,36 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36012,7 +41422,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36024,33 +41434,28 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.sessions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "parent": { + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+name}", + // "path": "v1alpha/{+parent}/sessions", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36059,25 +41464,24 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": +// method id "discoveryengine.projects.locations.dataStores.sessions.delete": -type ProjectsLocationsDataStoresServingConfigsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound 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: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -36085,54 +41489,41 @@ func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -36143,16 +41534,14 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36171,7 +41560,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36183,25 +41572,25 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.sessions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + // "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36210,48 +41599,32 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": +// method id "discoveryengine.projects.locations.dataStores.sessions.get": -type ProjectsLocationsDataStoresServingConfigsListCall struct { +type ProjectsLocationsDataStoresSessionsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// Get: Gets a Session. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { - c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 100. If a value -// greater than 100 is provided, at most 100 results are returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListServingConfigs` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { + c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36261,7 +41634,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleap // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -36269,21 +41642,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36296,7 +41669,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36304,22 +41677,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse or error +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse.ServerRes -// ponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36338,7 +41710,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36350,36 +41722,25 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", + // "description": "Gets a Session.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", + // "id": "discoveryengine.projects.locations.dataStores.sessions.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + // "name": { + // "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+parent}/servingConfigs", + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36388,123 +41749,133 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "discoveryengine.projects.locations.dataStores.sessions.list": + +type ProjectsLocationsDataStoresSessionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": +// List: Lists all Sessions by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { + c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsLocationsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("filter", filter) + return c } -// 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} -// /engines/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1alphaservingconfig *GoogleCloudDiscoveryengineV1alphaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1alphaservingconfig = googleclouddiscoveryenginev1alphaservingconfig +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `session_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided ServingConfig to update. The following are NOT -// supported: * ServingConfig.name If not set, all supported fields are -// updated. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSessions` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaservingconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaListSessionsResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaServingConfig, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36523,7 +41894,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1alphaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36535,34 +41906,46 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.sessions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", - // "required": true, + // "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" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", - // "format": "google-fieldmask", + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + // "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 `ListSessions` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1alpha/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" - // }, + // "path": "v1alpha/{+parent}/sessions", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36571,43 +41954,64 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaListSessionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.sessions.patch": + +type ProjectsLocationsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Patch: Updates a Session. Session action type cannot be changed. If +// the Session to update does not exist, a NOT_FOUND error is returned. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1alpharecommendrequest *GoogleCloudDiscoveryengineV1alphaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alpharecommendrequest = googleclouddiscoveryenginev1alpharecommendrequest +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/sessions/*`. +func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1alphasession *GoogleCloudDiscoveryengineV1alphaSession) *ProjectsLocationsDataStoresSessionsPatchCall { + c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1alphasession = googleclouddiscoveryenginev1alphasession + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Session to update. The following are NOT +// supported: * Session.name If not set or empty, all supported fields +// are updated. +func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36615,21 +42019,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -36637,36 +42041,36 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alpharecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasession) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaSession or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1alphaRecommendResponse.ServerResponse.Hea -// der or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1alphaSession.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaRecommendResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36685,7 +42089,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36697,28 +42101,34 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.sessions.patch", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:recommend", + // "path": "v1alpha/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendRequest" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36727,99 +42137,99 @@ func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.search": +// method id "discoveryengine.projects.locations.dataStores.sessions.answers.get": -type ProjectsLocationsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets a Answer. // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id +// }`. +func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1alphaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1alphaSearchResponse.ServerResponse.Header -// -// or (if a response was returned at all) in -// -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1alphaAnswer or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1alphaAnswer.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36838,7 +42248,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36850,28 +42260,25 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.search", + // "description": "Gets a Answer.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.sessions.answers.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Required. 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}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1alpha/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequest" - // }, + // "path": "v1alpha/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1alphaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1alphaAnswer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -36880,27 +42287,6 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - // method id "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch": type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { @@ -39197,6 +44583,301 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca } +// method id "discoveryengine.projects.locations.evaluations.operations.get": + +type ProjectsLocationsEvaluationsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsEvaluationsOperationsService) Get(name string) *ProjectsLocationsEvaluationsOperationsGetCall { + c := &ProjectsLocationsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluationsOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEvaluationsOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.evaluations.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.evaluations.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.groundingConfigs.check": + +type ProjectsLocationsGroundingConfigsCheckCall struct { + s *Service + groundingConfig string + googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Check: Performs a grounding check. +// +// - groundingConfig: The resource name of the grounding config, such as +// `projects/*/locations/global/groundingConfigs/default_grounding_conf +// ig`. +func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1alphacheckgroundingrequest *GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { + c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groundingConfig = groundingConfig + c.googleclouddiscoveryenginev1alphacheckgroundingrequest = googleclouddiscoveryenginev1alphacheckgroundingrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphacheckgroundingrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+groundingConfig}:check") + 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{ + "groundingConfig": c.groundingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a grounding check.", + // "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/groundingConfigs/{groundingConfigsId}:check", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.groundingConfigs.check", + // "parameterOrder": [ + // "groundingConfig" + // ], + // "parameters": { + // "groundingConfig": { + // "description": "Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groundingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1alpha/{+groundingConfig}:check", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1alphaCheckGroundingResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "discoveryengine.projects.locations.operations.get": type ProjectsLocationsOperationsGetCall struct { diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 363dc0719ef..ba711f3ed37 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1300,6 +1300,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", @@ -1453,6 +1481,199 @@ } } }, + "sessions": { + "methods": { + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sessions", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.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` * `session_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 `ListSessions` 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/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, "siteSearchEngine": { "methods": { "batchVerifyTargetSites": { @@ -2594,6 +2815,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", @@ -2746,70 +2995,263 @@ ] } } - } - } - }, - "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}/operations/{operationsId}", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.operations.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "The name of the operation resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "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}/operations", - "httpMethod": "GET", - "id": "discoveryengine.projects.locations.collections.operations.list", - "parameterOrder": [ - "name" - ], - "parameters": { - "filter": { - "description": "The standard list filter.", - "location": "query", - "type": "string" - }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", - "required": true, - "type": "string" - }, - "pageSize": { - "description": "The standard list page size.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "The standard list page token.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta/{+name}/operations", + "sessions": { + "methods": { + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.sessions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sessions", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.collections.engines.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.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` * `session_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 `ListSessions` 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}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.engines.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" + }, + "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}/operations/{operationsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "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}/operations", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.collections.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}/operations", "response": { "$ref": "GoogleLongrunningListOperationsResponse" }, @@ -3836,6 +4278,34 @@ }, "servingConfigs": { "methods": { + "answer": { + "description": "Answer query method.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.answer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "servingConfig": { + "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:answer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "get": { "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", @@ -3989,39 +4459,232 @@ } } }, - "siteSearchEngine": { + "sessions": { "methods": { - "disableAdvancedSiteSearch": { - "description": "Downgrade from advanced site search to basic site search.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + "create": { + "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", "httpMethod": "POST", - "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + "id": "discoveryengine.projects.locations.dataStores.sessions.create", "parameterOrder": [ - "siteSearchEngine" + "parent" ], "parameters": { - "siteSearchEngine": { - "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + "parent": { + "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", + "path": "v1beta/{+parent}/sessions", "request": { - "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" + "$ref": "GoogleCloudDiscoveryengineV1betaSession" }, "response": { - "$ref": "GoogleLongrunningOperation" + "$ref": "GoogleCloudDiscoveryengineV1betaSession" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, - "enableAdvancedSiteSearch": { - "description": "Upgrade from basic site search to advanced site search.", - "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + "delete": { + "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "DELETE", + "id": "discoveryengine.projects.locations.dataStores.sessions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets a Session.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists all Sessions by their parent DataStore.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.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` * `session_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 `ListSessions` call. Provide this to retrieve the subsequent page.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+parent}/sessions", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.sessions.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1beta/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "answers": { + "methods": { + "get": { + "description": "Gets a Answer.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + "httpMethod": "GET", + "id": "discoveryengine.projects.locations.dataStores.sessions.answers.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. 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}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+name}", + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "siteSearchEngine": { + "methods": { + "disableAdvancedSiteSearch": { + "description": "Downgrade from advanced site search to basic site search.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + "parameterOrder": [ + "siteSearchEngine" + ], + "parameters": { + "siteSearchEngine": { + "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "enableAdvancedSiteSearch": { + "description": "Upgrade from basic site search to advanced site search.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", "httpMethod": "POST", "id": "discoveryengine.projects.locations.dataStores.siteSearchEngine.enableAdvancedSiteSearch", "parameterOrder": [ @@ -4416,6 +5079,38 @@ } } }, + "groundingConfigs": { + "methods": { + "check": { + "description": "Performs a grounding check.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/groundingConfigs/{groundingConfigsId}:check", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.groundingConfigs.check", + "parameterOrder": [ + "groundingConfig" + ], + "parameters": { + "groundingConfig": { + "description": "Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/groundingConfigs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta/{+groundingConfig}:check", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "operations": { "methods": { "get": { @@ -4593,7 +5288,7 @@ } } }, - "revision": "20240329", + "revision": "20240401", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiHttpBody": { @@ -5303,6 +5998,11 @@ "format": "int64", "type": "string" }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -5720,397 +6420,475 @@ }, "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", + "GoogleCloudDiscoveryengineV1alphaAnswer": { + "description": "Defines an answer.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswer", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "answerSkippedReasons": { + "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", + "items": { + "enum": [ + "ANSWER_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_ANSWER_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION" + ], + "enumDescriptions": [ + "Default value. The answer skipped reason is not specified.", + "The adversarial query ignored case.", + "The non-answer seeking query ignored case.", + "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", + "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic." + ], + "type": "string" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "answerText": { + "description": "The textual answer.", "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { - "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", - "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", - "properties": { - "targetSites": { - "description": "TargetSites created.", + }, + "citations": { + "description": "Citations.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitation" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "completeTime": { + "description": "Output only. Answer completed timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", - "properties": { + }, "createTime": { - "description": "Operation create time.", + "description": "Output only. Answer creation timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { - "description": "Metadata for Create Schema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", - "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "queryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "description": "Query understanding information." + }, + "references": { + "description": "References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReference" + }, + "type": "array" + }, + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "The state of the answer generation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Answer generation is currently in progress.", + "Answer generation currently failed.", + "Answer generation has succeeded." + ], "type": "string" + }, + "steps": { + "description": "Answer generation steps.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStep" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitation", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "endIndex": { + "description": "End of the attributed segment, exclusive.", + "format": "int64", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "sources": { + "description": "Citation sources for the attributed segment.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDataStore": { - "description": "DataStore captures global settings and configs at the DataStore level.", - "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource", "properties": { - "aclEnabled": { - "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "referenceId": { + "description": "ID of the citation source.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { + "description": "Query understanding information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", + "properties": { + "queryClassificationInfo": { + "description": "Query classification information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo": { + "description": "Query classification information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo", + "properties": { + "positive": { + "description": "Classification output.", "type": "boolean" }, - "contentConfig": { - "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "type": { + "description": "Query classification type.", "enum": [ - "CONTENT_CONFIG_UNSPECIFIED", - "NO_CONTENT", - "CONTENT_REQUIRED", - "PUBLIC_WEBSITE" + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" ], "enumDescriptions": [ - "Default value.", - "Only contains documents without any Document.content.", - "Only contains documents with Document.content.", - "The data store is used for public website search." + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." ], "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReference": { + "description": "Reference.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReference", + "properties": { + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "description": "Chunk information." }, - "createTime": { - "description": "Output only. Timestamp the DataStore was created at.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "defaultSchemaId": { - "description": "Output only. The id of the default Schema asscociated to this data store.", - "readOnly": true, + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", + "description": "Unstructured document information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "displayName": { - "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + "content": { + "description": "Chunk textual content.", "type": "string" }, - "documentProcessingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", - "description": "Configuration for Document understanding and enrichment." - }, - "idpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", - "description": "Output only. Data store level identity provider config.", - "readOnly": true + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "description": "Document metadata." }, - "industryVertical": { - "description": "Immutable. The industry vertical that the data store registers.", - "enum": [ - "INDUSTRY_VERTICAL_UNSPECIFIED", - "GENERIC", - "MEDIA", - "HEALTHCARE_FHIR" - ], - "enumDescriptions": [ - "Value used when unset.", - "The generic vertical for documents that are not specific to any industry vertical.", - "The media industry vertical.", - "The healthcare FHIR vertical." - ], + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata": { + "description": "Document metadata.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata", + "properties": { + "document": { + "description": "Document resource name.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" }, - "solutionTypes": { - "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", - "items": { - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], - "type": "string" - }, - "type": "array" + "title": { + "description": "Title.", + "type": "string" }, - "startingSchema": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", - "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + "uri": { + "description": "URI for the document.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { - "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent" + }, + "type": "array" + }, + "document": { + "description": "Document resource name.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { - "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "content": { + "description": "Chunk textual content.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { - "description": "Metadata for DeleteSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStep": { + "description": "Step information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStep", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "actions": { + "description": "Actions.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction" + }, + "type": "array" + }, + "description": { + "description": "The description of the step.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "state": { + "description": "The state of the step.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Step is currently in progress.", + "Step currently failed.", + "Step has succeeded." + ], + "type": "string" + }, + "thought": { + "description": "The thought of the step.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepAction": { + "description": "Action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepAction", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "observation": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", + "description": "Observation." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "searchAction": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", + "description": "Search action." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation": { + "description": "Observation.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation", "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" + "searchResults": { + "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { - "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult": { + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult", "properties": { - "chunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", - "description": "Whether chunking mode is enabled." - }, - "defaultParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", - "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." + "chunkInfo": { + "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo" + }, + "type": "array" }, - "name": { - "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", + "document": { + "description": "Document resource name.", "type": "string" }, - "parsingConfigOverrides": { - "additionalProperties": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" + "snippetInfo": { + "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo" }, - "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", - "type": "object" + "type": "array" + }, + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { - "description": "Configuration for chunking config.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo", "properties": { - "layoutBasedChunkingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", - "description": "Configuration for the layout based chunking." + "chunk": { + "description": "Chunk resource name.", + "type": "string" + }, + "content": { + "description": "Chunk textual content.", + "type": "string" + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { - "description": "Configuration for the layout based chunking.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo", "properties": { - "chunkSize": { - "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", - "format": "int32", - "type": "integer" + "snippet": { + "description": "Snippet content.", + "type": "string" }, - "includeAncestorHeadings": { - "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", - "type": "boolean" + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { - "description": "Related configurations applied to a specific type of document parser.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction", "properties": { - "digitalParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "description": "Configurations applied to digital parser." - }, - "layoutParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "description": "Configurations applied to layout parser." - }, - "ocrParsingConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", - "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." + "query": { + "description": "The query to search.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { - "description": "The digital parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { - "description": "The layout parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", - "properties": {}, + "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" }, - "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { - "description": "The OCR parsing configurations for documents.", - "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse": { + "description": "Response message for SiteSearchEngineService.BatchCreateTargetSites method.", + "id": "GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse", "properties": { - "enhancedDocumentElements": { - "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "targetSites": { + "description": "TargetSites created.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSite" }, "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.CreateDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "useNativeText": { - "description": "If true, will use native text instead of OCR text on pages containing native text.", - "type": "boolean" + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", + "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.CreateEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -6125,48 +6903,90 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { - "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", - "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", - "properties": {}, + "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata": { + "description": "Metadata for Create Schema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata", + "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" }, - "GoogleCloudDiscoveryengineV1alphaEngine": { - "description": "Metadata that describes the training and serving parameters of an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngine", + "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.CreateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaCreateTargetSiteMetadata", "properties": { - "chatEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", - "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "chatEngineMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", - "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", - "readOnly": true + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDataStore": { + "description": "DataStore captures global settings and configs at the DataStore level.", + "id": "GoogleCloudDiscoveryengineV1alphaDataStore", + "properties": { + "aclEnabled": { + "description": "Immutable. Whether data in the DataStore has ACL information. If set to `true`, the source data must have ACL. ACL will be ingested when data is ingested by DocumentService.ImportDocuments methods. When ACL is enabled for the DataStore, Document can't be accessed by calling DocumentService.GetDocument or DocumentService.ListDocuments. Currently ACL is only supported in `GENERIC` industry vertical with non-`PUBLIC_WEBSITE` content config.", + "type": "boolean" }, - "commonConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", - "description": "Common config spec that specifies the metadata of the engine." + "contentConfig": { + "description": "Immutable. The content config of the data store. If this field is unset, the server behavior defaults to ContentConfig.NO_CONTENT.", + "enum": [ + "CONTENT_CONFIG_UNSPECIFIED", + "NO_CONTENT", + "CONTENT_REQUIRED", + "PUBLIC_WEBSITE" + ], + "enumDescriptions": [ + "Default value.", + "Only contains documents without any Document.content.", + "Only contains documents with Document.content.", + "The data store is used for public website search." + ], + "type": "string" }, "createTime": { - "description": "Output only. Timestamp the Recommendation Engine was created at.", + "description": "Output only. Timestamp the DataStore was created at.", "format": "google-datetime", "readOnly": true, "type": "string" }, - "dataStoreIds": { - "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", - "items": { - "type": "string" - }, - "type": "array" + "defaultSchemaId": { + "description": "Output only. The id of the default Schema asscociated to this data store.", + "readOnly": true, + "type": "string" }, "displayName": { - "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "description": "Required. The data store display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, + "documentProcessingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", + "description": "Configuration for Document understanding and enrichment." + }, + "idpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "description": "Output only. Data store level identity provider config.", + "readOnly": true + }, "industryVertical": { - "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine.", + "description": "Immutable. The industry vertical that the data store registers.", "enum": [ "INDUSTRY_VERTICAL_UNSPECIFIED", "GENERIC", @@ -6181,516 +7001,1416 @@ ], "type": "string" }, - "mediaRecommendationEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", - "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." - }, "name": { - "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", "type": "string" }, - "recommendationMetadata": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", - "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", - "readOnly": true - }, - "searchEngineConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", - "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." - }, - "similarDocumentsConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", - "description": "Additional config specs for a `similar-items` engine." - }, - "solutionType": { - "description": "Required. The solutions of the engine.", - "enum": [ - "SOLUTION_TYPE_UNSPECIFIED", - "SOLUTION_TYPE_RECOMMENDATION", - "SOLUTION_TYPE_SEARCH", - "SOLUTION_TYPE_CHAT", - "SOLUTION_TYPE_GENERATIVE_CHAT" - ], - "enumDescriptions": [ - "Default value.", - "Used for Recommendations AI.", - "Used for Discovery Search.", - "Used for use cases related to the Generative AI agent.", - "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." - ], + "solutionTypes": { + "description": "The solutions that the data store enrolls. Available solutions for each industry_vertical: * `MEDIA`: `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. Other solutions cannot be enrolled.", + "items": { + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "type": "array" + }, + "startingSchema": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSchema", + "description": "The start schema to use for this DataStore when provisioning it. If unset, a default vertical specialized schema will be used. This field is only used by CreateDataStore API, and will be ignored if used in other APIs. This field will be omitted from all API responses including CreateDataStore API. To retrieve a schema of a DataStore, use SchemaService.GetSchema API instead. The provided schema will be validated against certain rules on schema. Learn more from [this doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema)." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata": { + "description": "Metadata related to the progress of the DataStoreService.DeleteDataStore operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteDataStoreMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, "updateTime": { - "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", - "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { - "description": "Configurations for a Chat Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata": { + "description": "Metadata related to the progress of the EngineService.DeleteEngine operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteEngineMetadata", "properties": { - "agentCreationConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", - "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" }, - "dialogflowAgentToLink": { - "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Please use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { - "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata": { + "description": "Metadata for DeleteSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata", "properties": { - "business": { - "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", - "type": "string" - }, - "defaultLanguageCode": { - "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", - "type": "string" - }, - "location": { - "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "timeZone": { - "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { - "description": "Additional information of a Chat Engine. Fields in this message are output only.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteTargetSiteMetadata", "properties": { - "dialogflowAgent": { - "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { - "description": "Common configurations for an Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.DisableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchMetadata", "properties": { - "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.", + "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" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { - "description": "Additional config specs for a Media Recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.DisableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaDisableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig": { + "description": "A singleton resource of DataStore. It's empty when DataStore is created, which defaults to digital parser. The first call to DataStoreService.UpdateDocumentProcessingConfig method will initialize the config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfig", "properties": { - "optimizationObjective": { - "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", - "type": "string" + "chunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", + "description": "Whether chunking mode is enabled." }, - "optimizationObjectiveConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", - "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + "defaultParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", + "description": "Configurations for default Document parser. If not specified, we will configure it as default DigitalParsingConfig, and the default parsing config will be applied to all file types for Document parsing." }, - "trainingState": { - "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", - "enum": [ - "TRAINING_STATE_UNSPECIFIED", - "PAUSED", - "TRAINING" - ], - "enumDescriptions": [ - "Unspecified training state.", - "The engine training is paused.", - "The engine is training." - ], + "name": { + "description": "The full resource name of the Document Processing Config. Format: `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.", "type": "string" }, - "type": { - "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", - "type": "string" + "parsingConfigOverrides": { + "additionalProperties": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig" + }, + "description": "Map from file type to override the default parsing configuration based on the file type. Supported keys: * `pdf`: Override parsing config for PDF files, either digital parsing, ocr parsing or layout parsing is supported. * `html`: Override parsing config for HTML files, only digital parsing and or layout parsing are supported. * `docx`: Override parsing config for DOCX files, only digital parsing and or layout parsing are supported.", + "type": "object" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { - "description": "Custom threshold for `cvr` optimization_objective.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig": { + "description": "Configuration for chunking config.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfig", "properties": { - "targetField": { - "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", - "type": "string" - }, - "targetFieldValueFloat": { - "description": "Required. The threshold to be applied to the target (e.g., 0.5).", - "format": "float", - "type": "number" + "layoutBasedChunkingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", + "description": "Configuration for the layout based chunking." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { - "description": "Additional information of a recommendation engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig": { + "description": "Configuration for the layout based chunking.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigChunkingConfigLayoutBasedChunkingConfig", "properties": { - "dataState": { - "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", - "enum": [ - "DATA_STATE_UNSPECIFIED", - "DATA_OK", - "DATA_ERROR" - ], - "enumDescriptions": [ - "Unspecified default value, should never be explicitly set.", - "The engine has sufficient training data.", - "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." - ], - "readOnly": true, - "type": "string" - }, - "lastTuneTime": { - "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "servingState": { - "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", - "enum": [ - "SERVING_STATE_UNSPECIFIED", - "INACTIVE", - "ACTIVE", - "TUNED" - ], - "enumDescriptions": [ - "Unspecified serving state.", - "The engine is not serving.", - "The engine is serving and can be queried.", - "The engine is trained on tuned hyperparameters and can be queried." - ], - "readOnly": true, - "type": "string" + "chunkSize": { + "description": "The token size limit for each chunk. Supported values: 100-500 (inclusive). Default value: 500.", + "format": "int32", + "type": "integer" }, - "tuningOperation": { - "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", - "readOnly": true, - "type": "string" + "includeAncestorHeadings": { + "description": "Whether to include appending different levels of headings to chunks from the middle of the document to prevent context loss. Default value: False.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { - "description": "Configurations for a Search Engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig": { + "description": "Related configurations applied to a specific type of document parser.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfig", "properties": { - "searchAddOns": { - "description": "The add-on that this search engine enables.", - "items": { - "enum": [ - "SEARCH_ADD_ON_UNSPECIFIED", - "SEARCH_ADD_ON_LLM" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Large language model add-on." - ], - "type": "string" - }, - "type": "array" + "digitalParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", + "description": "Configurations applied to digital parser." }, - "searchTier": { - "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, please check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", - "enum": [ - "SEARCH_TIER_UNSPECIFIED", - "SEARCH_TIER_STANDARD", - "SEARCH_TIER_ENTERPRISE" - ], - "enumDescriptions": [ - "Default value when the enum is unspecified. This is invalid to use.", - "Standard tier.", - "Enterprise tier." - ], - "type": "string" + "layoutParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "description": "Configurations applied to layout parser." + }, + "ocrParsingConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", + "description": "Configurations applied to OCR parser. Currently it only applies to PDFs." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { - "description": "Additional config specs for a `similar-items` engine.", - "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig": { + "description": "The digital parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigDigitalParsingConfig", "properties": {}, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { - "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig": { + "description": "The layout parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigLayoutParsingConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig": { + "description": "The OCR parsing configurations for documents.", + "id": "GoogleCloudDiscoveryengineV1alphaDocumentProcessingConfigParsingConfigOcrParsingConfig", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "enhancedDocumentElements": { + "description": "Apply additional enhanced OCR processing to a list of document elements. Supported values: * `table`: advanced table parsing model.", + "items": { + "type": "string" + }, + "type": "array" + }, + "useNativeText": { + "description": "If true, will use native text instead of OCR text on pages containing native text.", + "type": "boolean" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { - "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchMetadata", "properties": { - "dataSizeBytes": { - "description": "Data size in terms of bytes.", - "format": "int64", + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", "type": "string" }, - "documentCount": { - "description": "Total number of documents.", - "format": "int64", + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaFieldConfig": { - "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", - "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", + "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse": { + "description": "Response message for SiteSearchEngineService.EnableAdvancedSiteSearch method.", + "id": "GoogleCloudDiscoveryengineV1alphaEnableAdvancedSiteSearchResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngine": { + "description": "Metadata that describes the training and serving parameters of an Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngine", "properties": { - "completableOption": { - "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "COMPLETABLE_OPTION_UNSPECIFIED", - "COMPLETABLE_ENABLED", - "COMPLETABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Completable option enabled for a schema field.", - "Completable option disabled for a schema field." - ], + "chatEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "description": "Configurations for the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT." + }, + "chatEngineMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "description": "Output only. Additional information of the Chat Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT.", + "readOnly": true + }, + "commonConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig", + "description": "Common config spec that specifies the metadata of the engine." + }, + "createTime": { + "description": "Output only. Timestamp the Recommendation Engine was created at.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "dynamicFacetableOption": { - "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", + "dataStoreIds": { + "description": "The data stores associated with this engine. For SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of engines, they can only associate with at most one data store. If solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same Collection can be associated here. Note that when used in CreateEngineRequest, one DataStore id must be provided as the system will use it for necessary initializations.", + "items": { + "type": "string" + }, + "type": "array" + }, + "displayName": { + "description": "Required. The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.", + "type": "string" + }, + "industryVertical": { + "description": "The industry vertical that the engine registers. The restriction of the Engine industry vertical is based on DataStore: If unspecified, default to `GENERIC`. Vertical on Engine has to match vertical of the DataStore liniked to the engine.", "enum": [ - "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", - "DYNAMIC_FACETABLE_ENABLED", - "DYNAMIC_FACETABLE_DISABLED" + "INDUSTRY_VERTICAL_UNSPECIFIED", + "GENERIC", + "MEDIA", + "HEALTHCARE_FHIR" ], "enumDescriptions": [ "Value used when unset.", - "Dynamic facetable option enabled for a schema field.", - "Dynamic facetable option disabled for a schema field." + "The generic vertical for documents that are not specific to any industry vertical.", + "The media industry vertical.", + "The healthcare FHIR vertical." ], "type": "string" }, - "fieldPath": { - "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", - "type": "string" + "mediaRecommendationEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "description": "Configurations for the Media Engine. Only applicable on the data stores with solution_type SOLUTION_TYPE_RECOMMENDATION and IndustryVertical.MEDIA vertical." }, - "fieldType": { - "description": "Output only. Raw type of the field.", - "enum": [ - "FIELD_TYPE_UNSPECIFIED", - "OBJECT", - "STRING", - "NUMBER", - "INTEGER", - "BOOLEAN", - "GEOLOCATION", - "DATETIME" - ], - "enumDescriptions": [ - "Field type is unspecified.", - "Field value type is Object.", - "Field value type is String.", - "Field value type is Number.", - "Field value type is Integer.", - "Field value type is Boolean.", - "Field value type is Geolocation.", - "Field value type is Datetime." - ], - "readOnly": true, + "name": { + "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", "type": "string" }, - "indexableOption": { - "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", + "recommendationMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "description": "Output only. Additional information of a recommendation engine. Only applicable if solution_type is SOLUTION_TYPE_RECOMMENDATION.", + "readOnly": true + }, + "searchEngineConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "description": "Configurations for the Search Engine. Only applicable if solution_type is SOLUTION_TYPE_SEARCH." + }, + "similarDocumentsConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "description": "Additional config specs for a `similar-items` engine." + }, + "solutionType": { + "description": "Required. The solutions of the engine.", "enum": [ - "INDEXABLE_OPTION_UNSPECIFIED", - "INDEXABLE_ENABLED", - "INDEXABLE_DISABLED" + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" ], "enumDescriptions": [ - "Value used when unset.", - "Indexable option enabled for a schema field.", - "Indexable option disabled for a schema field." + "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" }, - "keyPropertyType": { - "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", + "updateTime": { + "description": "Output only. Timestamp the Recommendation Engine was last updated.", + "format": "google-datetime", "readOnly": true, "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig": { + "description": "Configurations for a Chat Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfig", + "properties": { + "agentCreationConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "description": "The configurationt generate the Dialogflow agent that is associated to this Engine. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation." }, - "recsFilterableOption": { - "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", - "enum": [ - "FILTERABLE_OPTION_UNSPECIFIED", - "FILTERABLE_ENABLED", - "FILTERABLE_DISABLED" - ], - "enumDescriptions": [ - "Value used when unset.", - "Filterable option enabled for a schema field.", - "Filterable option disabled for a schema field." - ], + "dialogflowAgentToLink": { + "description": "The resource name of an exist Dialogflow agent to link to this Chat Engine. Customers can either provide `agent_creation_config` to create agent or provide an agent name that links the agent with the Chat engine. Format: `projects//locations//agents/`. Note that the `dialogflow_agent_to_link` are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation. Please use ChatEngineMetadata.dialogflow_agent for actual agent association after Engine is created.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig": { + "description": "Configurations for generating a Dialogflow agent. Note that these configurations are one-time consumed by and passed to Dialogflow service. It means they cannot be retrieved using EngineService.GetEngine or EngineService.ListEngines API after engine creation.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineConfigAgentCreationConfig", + "properties": { + "business": { + "description": "Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.", "type": "string" }, - "retrievableOption": { - "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", - "enum": [ - "RETRIEVABLE_OPTION_UNSPECIFIED", - "RETRIEVABLE_ENABLED", - "RETRIEVABLE_DISABLED" + "defaultLanguageCode": { + "description": "Required. The default language of the agent as a language tag. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes.", + "type": "string" + }, + "location": { + "description": "Agent location for Agent creation, supported values: global/us/eu. If not provided, us Engine will create Agent using us-central-1 by default; eu Engine will create Agent using eu-west-1 by default.", + "type": "string" + }, + "timeZone": { + "description": "Required. The time zone of the agent from the [time zone database](https://www.iana.org/time-zones), e.g., America/New_York, Europe/Paris.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata": { + "description": "Additional information of a Chat Engine. Fields in this message are output only.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineChatEngineMetadata", + "properties": { + "dialogflowAgent": { + "description": "The resource name of a Dialogflow agent, that this Chat Engine refers to. Format: `projects//locations//agents/`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineCommonConfig": { + "description": "Common configurations for an Engine.", + "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.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig": { + "description": "Additional config specs for a Media Recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfig", + "properties": { + "optimizationObjective": { + "description": "The optimization objective. e.g., `cvr`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `ctr`, `cvr`. If not specified, we choose default based on engine type. Default depends on type of recommendation: `recommended-for-you` =\u003e `ctr` `others-you-may-like` =\u003e `ctr`", + "type": "string" + }, + "optimizationObjectiveConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "description": "Name and value of the custom threshold for cvr optimization_objective. For target_field `watch-time`, target_field_value must be an integer value indicating the media progress time in seconds between (0, 86400] (excludes 0, includes 86400) (e.g., 90). For target_field `watch-percentage`, the target_field_value must be a valid float value between (0, 1.0] (excludes 0, includes 1.0) (e.g., 0.5)." + }, + "trainingState": { + "description": "The training state that the engine is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train engine in order to control cost. If not specified: the default value for `CreateEngine` method is `TRAINING`. The default value for `UpdateEngine` method is to keep the state the same as before.", + "enum": [ + "TRAINING_STATE_UNSPECIFIED", + "PAUSED", + "TRAINING" + ], + "enumDescriptions": [ + "Unspecified training state.", + "The engine training is paused.", + "The engine is training." + ], + "type": "string" + }, + "type": { + "description": "Required. The type of engine. e.g., `recommended-for-you`. This field together with optimization_objective describe engine metadata to use to control engine training and serving. Currently supported values: `recommended-for-you`, `others-you-may-like`, `more-like-this`, `most-popular-items`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig": { + "description": "Custom threshold for `cvr` optimization_objective.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineMediaRecommendationEngineConfigOptimizationObjectiveConfig", + "properties": { + "targetField": { + "description": "Required. The name of the field to target. Currently supported values: `watch-percentage`, `watch-time`.", + "type": "string" + }, + "targetFieldValueFloat": { + "description": "Required. The threshold to be applied to the target (e.g., 0.5).", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata": { + "description": "Additional information of a recommendation engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineRecommendationMetadata", + "properties": { + "dataState": { + "description": "Output only. The state of data requirements for this engine: `DATA_OK` and `DATA_ERROR`. Engine cannot be trained if the data is in `DATA_ERROR` state. Engine can have `DATA_ERROR` state even if serving state is `ACTIVE`: engines were trained successfully before, but cannot be refreshed because the underlying engine no longer has sufficient data for training.", + "enum": [ + "DATA_STATE_UNSPECIFIED", + "DATA_OK", + "DATA_ERROR" + ], + "enumDescriptions": [ + "Unspecified default value, should never be explicitly set.", + "The engine has sufficient training data.", + "The engine does not have sufficient training data. Error messages can be queried via Stackdriver." + ], + "readOnly": true, + "type": "string" + }, + "lastTuneTime": { + "description": "Output only. The timestamp when the latest successful tune finished. Only applicable on Media Recommendation engines.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "servingState": { + "description": "Output only. The serving state of the engine: `ACTIVE`, `NOT_ACTIVE`.", + "enum": [ + "SERVING_STATE_UNSPECIFIED", + "INACTIVE", + "ACTIVE", + "TUNED" + ], + "enumDescriptions": [ + "Unspecified serving state.", + "The engine is not serving.", + "The engine is serving and can be queried.", + "The engine is trained on tuned hyperparameters and can be queried." + ], + "readOnly": true, + "type": "string" + }, + "tuningOperation": { + "description": "Output only. The latest tune operation id associated with the engine. Only applicable on Media Recommendation engines. If present, this operation id can be used to determine if there is an ongoing tune for this engine. To check the operation status, send the GetOperation request with this operation id in the engine resource format. If no tuning has happened for this engine, the string is empty.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig": { + "description": "Configurations for a Search Engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSearchEngineConfig", + "properties": { + "searchAddOns": { + "description": "The add-on that this search engine enables.", + "items": { + "enum": [ + "SEARCH_ADD_ON_UNSPECIFIED", + "SEARCH_ADD_ON_LLM" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Large language model add-on." + ], + "type": "string" + }, + "type": "array" + }, + "searchTier": { + "description": "The search feature tier of this engine. Different tiers might have different pricing. To learn more, please check the pricing documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not specified.", + "enum": [ + "SEARCH_TIER_UNSPECIFIED", + "SEARCH_TIER_STANDARD", + "SEARCH_TIER_ENTERPRISE" + ], + "enumDescriptions": [ + "Default value when the enum is unspecified. This is invalid to use.", + "Standard tier.", + "Enterprise tier." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig": { + "description": "Additional config specs for a `similar-items` engine.", + "id": "GoogleCloudDiscoveryengineV1alphaEngineSimilarDocumentsEngineConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata": { + "description": "Metadata related to the progress of the EstimateDataSize operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse": { + "description": "Response of the EstimateDataSize request. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaEstimateDataSizeResponse", + "properties": { + "dataSizeBytes": { + "description": "Data size in terms of bytes.", + "format": "int64", + "type": "string" + }, + "documentCount": { + "description": "Total number of documents.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaFieldConfig": { + "description": "Configurations for fields of a schema. For example, configuring a field is indexable, or searchable.", + "id": "GoogleCloudDiscoveryengineV1alphaFieldConfig", + "properties": { + "completableOption": { + "description": "If completable_option is COMPLETABLE_ENABLED, field values are directly used and returned as suggestions for Autocomplete in CompletionService.CompleteQuery. If completable_option is unset, the server behavior defaults to COMPLETABLE_DISABLED for fields that support setting completable options, which are just `string` fields. For those fields that do not support setting completable options, the server will skip completable option setting, and setting completable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "COMPLETABLE_OPTION_UNSPECIFIED", + "COMPLETABLE_ENABLED", + "COMPLETABLE_DISABLED" ], "enumDescriptions": [ "Value used when unset.", - "Retrievable option enabled for a schema field.", - "Retrievable option disabled for a schema field." + "Completable option enabled for a schema field.", + "Completable option disabled for a schema field." + ], + "type": "string" + }, + "dynamicFacetableOption": { + "description": "If dynamic_facetable_option is DYNAMIC_FACETABLE_ENABLED, field values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if FieldConfig.indexable_option is INDEXABLE_DISABLED. Otherwise, an `INVALID_ARGUMENT` error will be returned. If dynamic_facetable_option is unset, the server behavior defaults to DYNAMIC_FACETABLE_DISABLED for fields that support setting dynamic facetable options. For those fields that do not support setting dynamic facetable options, such as `object` and `boolean`, the server will skip dynamic facetable option setting, and setting dynamic_facetable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", + "DYNAMIC_FACETABLE_ENABLED", + "DYNAMIC_FACETABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Dynamic facetable option enabled for a schema field.", + "Dynamic facetable option disabled for a schema field." + ], + "type": "string" + }, + "fieldPath": { + "description": "Required. Field path of the schema field. For example: `title`, `description`, `release_info.release_year`.", + "type": "string" + }, + "fieldType": { + "description": "Output only. Raw type of the field.", + "enum": [ + "FIELD_TYPE_UNSPECIFIED", + "OBJECT", + "STRING", + "NUMBER", + "INTEGER", + "BOOLEAN", + "GEOLOCATION", + "DATETIME" ], + "enumDescriptions": [ + "Field type is unspecified.", + "Field value type is Object.", + "Field value type is String.", + "Field value type is Number.", + "Field value type is Integer.", + "Field value type is Boolean.", + "Field value type is Geolocation.", + "Field value type is Datetime." + ], + "readOnly": true, + "type": "string" + }, + "indexableOption": { + "description": "If indexable_option is INDEXABLE_ENABLED, field values are indexed so that it can be filtered or faceted in SearchService.Search. If indexable_option is unset, the server behavior defaults to INDEXABLE_DISABLED for fields that support setting indexable options. For those fields that do not support setting indexable options, such as `object` and `boolean` and key properties, the server will skip indexable_option setting, and setting indexable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "INDEXABLE_OPTION_UNSPECIFIED", + "INDEXABLE_ENABLED", + "INDEXABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Indexable option enabled for a schema field.", + "Indexable option disabled for a schema field." + ], + "type": "string" + }, + "keyPropertyType": { + "description": "Output only. Type of the key property that this field is mapped to. Empty string if this is not annotated as mapped to a key property. Example types are `title`, `description`. Full list is defined by `keyPropertyMapping` in the schema field annotation. If the schema field has a `KeyPropertyMapping` annotation, `indexable_option` and `searchable_option` of this field cannot be modified.", + "readOnly": true, + "type": "string" + }, + "recsFilterableOption": { + "description": "If recs_filterable_option is FILTERABLE_ENABLED, field values are filterable by filter expression in RecommendationService.Recommend. If FILTERABLE_ENABLED but the field type is numerical, field values are not filterable by text queries in RecommendationService.Recommend. Only textual fields are supported. If recs_filterable_option is unset, the default setting is FILTERABLE_DISABLED for fields that support setting filterable options. When a field set to [FILTERABLE_DISABLED] is filtered, a warning is generated and an empty result is returned.", + "enum": [ + "FILTERABLE_OPTION_UNSPECIFIED", + "FILTERABLE_ENABLED", + "FILTERABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Filterable option enabled for a schema field.", + "Filterable option disabled for a schema field." + ], + "type": "string" + }, + "retrievableOption": { + "description": "If retrievable_option is RETRIEVABLE_ENABLED, field values are included in the search results. If retrievable_option is unset, the server behavior defaults to RETRIEVABLE_DISABLED for fields that support setting retrievable options. For those fields that do not support setting retrievable options, such as `object` and `boolean`, the server will skip retrievable option setting, and setting retrievable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "RETRIEVABLE_OPTION_UNSPECIFIED", + "RETRIEVABLE_ENABLED", + "RETRIEVABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Retrievable option enabled for a schema field.", + "Retrievable option disabled for a schema field." + ], + "type": "string" + }, + "searchableOption": { + "description": "If searchable_option is SEARCHABLE_ENABLED, field values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but field type is numerical, field values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical fields. If searchable_option is unset, the server behavior defaults to SEARCHABLE_DISABLED for fields that support setting searchable options. Only `string` fields that have no key property mapping support setting searchable_option. For those fields that do not support setting searchable options, the server will skip searchable option setting, and setting searchable_option for those fields will throw `INVALID_ARGUMENT` error.", + "enum": [ + "SEARCHABLE_OPTION_UNSPECIFIED", + "SEARCHABLE_ENABLED", + "SEARCHABLE_DISABLED" + ], + "enumDescriptions": [ + "Value used when unset.", + "Searchable option enabled for a schema field.", + "Searchable option disabled for a schema field." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaIdpConfig": { + "description": "Identity Provider Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "properties": { + "externalIdpConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "description": "External Identity provider config." + }, + "idpType": { + "description": "Identity provider type configured.", + "enum": [ + "IDP_TYPE_UNSPECIFIED", + "GSUITE", + "THIRD_PARTY" + ], + "enumDescriptions": [ + "Default value. ACL search not enabled.", + "Google 1P provider.", + "Third party provider." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { + "description": "Third party IDP Config.", + "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", + "properties": { + "workforcePoolName": { + "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { + "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { + "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "failureCount": { + "description": "Count of CompletionSuggestions that failed to be imported.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of CompletionSuggestions successfully imported.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { + "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { + "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors in the request if set." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { + "description": "Configuration of destination for Import related errors.", + "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "properties": { + "gcsPrefix": { + "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "failedEntriesCount": { + "description": "Count of deny list entries that failed to be imported.", + "format": "int64", + "type": "string" + }, + "importedEntriesCount": { + "description": "Count of deny list entries successfully imported.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { + "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were processed successfully.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { + "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", + "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", + "properties": { + "errorConfig": { + "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "description": "Echoes the destination for the complete errors if this field was set in the request." + }, + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "joinedEventsCount": { + "description": "Count of user events imported with complete existing Documents.", + "format": "int64", + "type": "string" + }, + "unjoinedEventsCount": { + "description": "Count of user events imported, but with Document information not found in the existing Branch.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { + "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "ignoredCount": { + "description": "Count of entries that were ignored as entries were not found.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { + "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", + "properties": { + "purgeCount": { + "description": "The total count of documents purged as a result of the operation.", + "format": "int64", + "type": "string" + }, + "purgeSample": { + "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "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" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { + "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "failureCount": { + "description": "Count of entries that encountered errors while processing.", + "format": "int64", + "type": "string" + }, + "successCount": { + "description": "Count of entries that were deleted successfully.", + "format": "int64", + "type": "string" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { + "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "properties": { + "purgeCount": { + "description": "The total count of events purged as a result of the operation.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaQuery": { + "description": "Defines a user inputed query.", + "id": "GoogleCloudDiscoveryengineV1alphaQuery", + "properties": { + "queryId": { + "description": "Unique Id for the query.", + "type": "string" + }, + "text": { + "description": "Plain text.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", + "properties": { + "createTime": { + "description": "Operation create time.", + "format": "google-datetime", + "type": "string" + }, + "invalidUris": { + "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", + "items": { + "type": "string" + }, + "type": "array" + }, + "pendingCount": { + "description": "Total number of URIs that have yet to be crawled.", + "format": "int32", + "type": "integer" + }, + "quotaExceededCount": { + "description": "Total number of URIs that were rejected due to insufficient indexing resources.", + "format": "int32", + "type": "integer" + }, + "successCount": { + "description": "Total number of URIs that have been crawled so far.", + "format": "int32", + "type": "integer" + }, + "updateTime": { + "description": "Operation last update time. If the operation is done, this is also the finish time.", + "format": "google-datetime", + "type": "string" + }, + "validUrisCount": { + "description": "Total number of unique URIs in the request that are not in invalid_uris.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { + "description": "Response message for SiteSearchEngineService.RecrawlUris method.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", + "properties": { + "failedUris": { + "description": "URIs that were not crawled before the LRO terminated.", + "items": { + "type": "string" + }, + "type": "array" + }, + "failureSamples": { + "description": "Details for a sample of up to 10 `failed_uris`.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { + "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", + "properties": { + "failureReasons": { + "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" + }, + "type": "array" + }, + "uri": { + "description": "URI that failed to be crawled.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { + "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", + "properties": { + "corpusType": { + "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", + "enum": [ + "CORPUS_TYPE_UNSPECIFIED", + "DESKTOP", + "MOBILE" + ], + "enumDescriptions": [ + "Default value.", + "Denotes a crawling attempt for the desktop version of a page.", + "Denotes a crawling attempt for the mobile version of a page." + ], + "type": "string" + }, + "errorMessage": { + "description": "Reason why the URI was not crawled.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSchema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1alphaSchema", + "properties": { + "fieldConfigs": { + "description": "Output only. Configurations for fields of the schema.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" + }, + "readOnly": true, + "type": "array" + }, + "jsonSchema": { + "description": "The JSON representation of the schema.", + "type": "string" + }, + "name": { + "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaSession": { + "description": "External session proto definition.", + "id": "GoogleCloudDiscoveryengineV1alphaSession", + "properties": { + "endTime": { + "description": "Output only. The time the session finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "type": "string" + }, + "startTime": { + "description": "Output only. The time the session started.", + "format": "google-datetime", + "readOnly": true, "type": "string" }, - "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.", + "state": { + "description": "The state of the session.", "enum": [ - "SEARCHABLE_OPTION_UNSPECIFIED", - "SEARCHABLE_ENABLED", - "SEARCHABLE_DISABLED" + "STATE_UNSPECIFIED", + "IN_PROGRESS" ], "enumDescriptions": [ - "Value used when unset.", - "Searchable option enabled for a schema field.", - "Searchable option disabled for a schema field." + "State is unspecified.", + "The session is currently open." ], "type": "string" + }, + "turns": { + "description": "Turns.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSessionTurn" + }, + "type": "array" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaGroundingConfig": { - "description": "Grounding configuration.", - "id": "GoogleCloudDiscoveryengineV1alphaGroundingConfig", + "GoogleCloudDiscoveryengineV1alphaSessionTurn": { + "description": "Represents a turn, including a query from the user and a answer from service.", + "id": "GoogleCloudDiscoveryengineV1alphaSessionTurn", "properties": { - "name": { - "description": "Required. Name of the GroundingConfig, of the form `projects/{project}/locations/{location}/groundingConfig`.", + "answer": { + "description": "The resource name of the answer to the user query.", "type": "string" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1alphaQuery", + "description": "The user query." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaIdpConfig": { - "description": "Identity Provider Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfig", + "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { + "description": "Verification information for target sites in advanced site search.", + "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", "properties": { - "externalIdpConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", - "description": "External Identity provider config." - }, - "idpType": { - "description": "Identity provider type configured.", + "siteVerificationState": { + "description": "Site verification state indicating the ownership and validity.", "enum": [ - "IDP_TYPE_UNSPECIFIED", - "GSUITE", - "THIRD_PARTY" + "SITE_VERIFICATION_STATE_UNSPECIFIED", + "VERIFIED", + "UNVERIFIED", + "EXEMPTED" ], "enumDescriptions": [ - "Default value. ACL search not enabled.", - "Google 1P provider.", - "Third party provider." + "Defaults to VERIFIED.", + "Site ownership verified.", + "Site ownership pending verification or verification failed.", + "Site exempt from verification, e.g., a public website that opens to all." ], "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig": { - "description": "Third party IDP Config.", - "id": "GoogleCloudDiscoveryengineV1alphaIdpConfigExternalIdpConfig", - "properties": { - "workforcePoolName": { - "description": "Workforce pool name. Example: \"locations/global/workforcePools/pool_id\"", + }, + "verifyTime": { + "description": "Latest site verification time.", + "format": "google-datetime", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata": { - "description": "Metadata related to the progress of the ImportCompletionSuggestions operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsMetadata", + "GoogleCloudDiscoveryengineV1alphaTargetSite": { + "description": "A target site for the SiteSearchEngine.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "exactMatch": { + "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", + "type": "boolean" + }, + "failureReason": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "description": "Output only. Failure reason.", + "readOnly": true + }, + "generatedUriPattern": { + "description": "Output only. This is system-generated based on the provided_uri_pattern.", + "readOnly": true, + "type": "string" + }, + "indexingStatus": { + "description": "Output only. Indexing status.", + "enum": [ + "INDEXING_STATUS_UNSPECIFIED", + "PENDING", + "FAILED", + "SUCCEEDED", + "DELETING" + ], + "enumDescriptions": [ + "Defaults to SUCCEEDED.", + "The target site is in the update queue and will be picked up by indexing pipeline.", + "The target site fails to be indexed.", + "The target site has been indexed.", + "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." + ], + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + "readOnly": true, + "type": "string" + }, + "providedUriPattern": { + "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", + "type": "string" + }, + "siteVerificationInfo": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "description": "Output only. Site ownership and validity verification status.", + "readOnly": true + }, + "type": { + "description": "The type of the target site, e.g., whether the site is to be included or excluded.", + "enum": [ + "TYPE_UNSPECIFIED", + "INCLUDE", + "EXCLUDE" + ], + "enumDescriptions": [ + "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", + "Include the target site.", + "Exclude the target site." + ], "type": "string" }, "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", + "description": "Output only. The target site's last updated time.", "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse": { - "description": "Response of the CompletionService.ImportCompletionSuggestions method. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportCompletionSuggestionsResponse", + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { + "description": "Site search indexing failure reasons.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "failureCount": { - "description": "Count of CompletionSuggestions that failed to be imported.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of CompletionSuggestions successfully imported.", + "quotaFailure": { + "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "description": "Failed due to insufficient quota." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { + "description": "Failed due to insufficient quota.", + "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "properties": { + "totalRequiredQuota": { + "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", "format": "int64", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata": { - "description": "Metadata related to the progress of the ImportDocuments operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { + "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6699,38 +8419,56 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse": { - "description": "Response of the ImportDocumentsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportDocumentsResponse", + "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { + "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", + "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", "properties": { "errorConfig": { "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", "description": "Echoes the destination for the complete errors in the request if set." }, "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "description": "A sample of errors encountered while processing the data.", "items": { "$ref": "GoogleRpcStatus" }, "type": "array" + }, + "metrics": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "description": "The metrics of the trained model.", + "type": "object" + }, + "modelStatus": { + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportErrorConfig": { - "description": "Configuration of destination for Import related errors.", - "id": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", + "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { + "description": "Metadata associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", "properties": { - "gcsPrefix": { - "description": "Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", + "engine": { + "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the ImportSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { + "description": "Response associated with a tune operation.", + "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { + "description": "Metadata for UpdateSchema LRO.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", "properties": { "createTime": { "description": "Operation create time.", @@ -6745,49 +8483,15 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.ImportSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaImportSuggestionDenyListEntriesResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "failedEntriesCount": { - "description": "Count of deny list entries that failed to be imported.", - "format": "int64", - "type": "string" - }, - "importedEntriesCount": { - "description": "Count of deny list entries successfully imported.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata": { - "description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsMetadata", + "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { + "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", "properties": { "createTime": { "description": "Operation create time.", "format": "google-datetime", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" - }, - "successCount": { - "description": "Count of entries that were processed successfully.", - "format": "int64", - "type": "string" - }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -6796,517 +8500,775 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse": { - "description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", - "id": "GoogleCloudDiscoveryengineV1alphaImportUserEventsResponse", + "GoogleCloudDiscoveryengineV1betaAnswer": { + "description": "Defines an answer.", + "id": "GoogleCloudDiscoveryengineV1betaAnswer", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors if this field was set in the request." - }, - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", + "answerSkippedReasons": { + "description": "Additional answer-skipped reasons. This provides the reason for ignored cases. If nothing is skipped, this field is not set.", "items": { - "$ref": "GoogleRpcStatus" + "enum": [ + "ANSWER_SKIPPED_REASON_UNSPECIFIED", + "ADVERSARIAL_QUERY_IGNORED", + "NON_ANSWER_SEEKING_QUERY_IGNORED", + "OUT_OF_DOMAIN_QUERY_IGNORED", + "POTENTIAL_POLICY_VIOLATION" + ], + "enumDescriptions": [ + "Default value. The answer skipped reason is not specified.", + "The adversarial query ignored case.", + "The non-answer seeking query ignored case.", + "The out-of-domain query ignored case. Google skips the answer if there are no high-relevance search results.", + "The potential policy violation case. Google skips the answer if there is a potential policy violation detected. This includes content that may be violent or toxic." + ], + "type": "string" }, "type": "array" }, - "joinedEventsCount": { - "description": "Count of user events imported with complete existing Documents.", - "format": "int64", + "answerText": { + "description": "The textual answer.", "type": "string" }, - "unjoinedEventsCount": { - "description": "Count of user events imported, but with Document information not found in the existing Branch.", - "format": "int64", + "citations": { + "description": "Citations.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerCitation" + }, + "type": "array" + }, + "completeTime": { + "description": "Output only. Answer completed timestamp.", + "format": "google-datetime", + "readOnly": true, "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata": { - "description": "Metadata related to the progress of the PurgeDocuments operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsMetadata", - "properties": { + }, "createTime": { - "description": "Operation create time.", + "description": "Output only. Answer creation timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" }, - "ignoredCount": { - "description": "Count of entries that were ignored as entries were not found.", - "format": "int64", - "type": "string" + "queryUnderstandingInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo", + "description": "Query understanding information." }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", - "type": "string" + "references": { + "description": "References.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerReference" + }, + "type": "array" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "relatedQuestions": { + "description": "Suggested related questions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "state": { + "description": "The state of the answer generation.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Answer generation is currently in progress.", + "Answer generation currently failed.", + "Answer generation has succeeded." + ], "type": "string" + }, + "steps": { + "description": "Answer generation steps.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStep" + }, + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse": { - "description": "Response message for DocumentService.PurgeDocuments method. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeDocumentsResponse", + "GoogleCloudDiscoveryengineV1betaAnswerCitation": { + "description": "Citation info for a segment.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerCitation", "properties": { - "purgeCount": { - "description": "The total count of documents purged as a result of the operation.", + "endIndex": { + "description": "End of the attributed segment, exclusive.", "format": "int64", "type": "string" }, - "purgeSample": { - "description": "A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", + "sources": { + "description": "Citation sources for the attributed segment.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerCitationSource" }, "type": "array" + }, + "startIndex": { + "description": "Index indicates the start of the segment, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerCitationSource": { + "description": "Citation source.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerCitationSource", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" - }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "referenceId": { + "description": "ID of the citation source.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeSuggestionDenyListEntriesResponse", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest": { + "description": "Request message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest", "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" + "answerGenerationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec", + "description": "Answer generation specification." }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", + "asynchronousMode": { + "description": "Asynchronous mode control. If enabled, the response will be returned with answer/session resource name without final answer. The API users need to do the polling to get the latest status of answer/session by calling ConversationalSearchService.GetAnswer or ConversationalSearchService.GetSession method.", + "type": "boolean" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1betaQuery", + "description": "Required. Current user query." + }, + "queryUnderstandingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec", + "description": "Query understanding specification." + }, + "relatedQuestionsSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec", + "description": "Related questions specification." + }, + "safetySpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec", + "description": "Model specification." + }, + "searchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec", + "description": "Search specification." + }, + "session": { + "description": "The session resource name. Not required. When session field is not set, the API is in sessionless mode. We support auto session mode: users can use the wildcard symbol “-” as session id. A new id will be automatically generated and assigned.", + "type": "string" + }, + "userPseudoId": { + "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata": { - "description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec": { + "description": "Answer generation specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "answerLanguageCode": { + "description": "Language code for Answer. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature.", "type": "string" }, - "failureCount": { - "description": "Count of entries that encountered errors while processing.", - "format": "int64", - "type": "string" + "ignoreAdversarialQuery": { + "description": "Specifies whether to filter out adversarial queries. The default value is `false`. Google employs search-query classification to detect adversarial queries. No answer is returned if the search query is classified as an adversarial query. For example, a user might ask a question regarding negative comments about the company or submit a query designed to generate unsafe, policy-violating output. If this field is set to `true`, we skip generating answers for adversarial queries and return fallback messages instead.", + "type": "boolean" }, - "successCount": { - "description": "Count of entries that were deleted successfully.", - "format": "int64", - "type": "string" + "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" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "includeCitations": { + "description": "Specifies whether to include citation metadata in the answer. The default value is `false`.", + "type": "boolean" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec", + "description": "Answer generation model specification." + }, + "promptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec", + "description": "Answer generation prompt specification." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse": { - "description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec": { + "description": "Answer Generation Model specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec", "properties": { - "purgeCount": { - "description": "The total count of events purged as a result of the operation.", - "format": "int64", + "modelVersion": { + "description": "Model version. If not set, it will use the default stable model. Allowed values are: stable, preview.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.RecrawlUris operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec": { + "description": "Answer generation prompt specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "preamble": { + "description": "Customized preamble.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec": { + "description": "Query understanding specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec", + "properties": { + "queryClassificationSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "description": "Query classification specification." }, - "invalidUris": { - "description": "Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE.", + "queryRephraserSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "description": "Query rephraser specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec": { + "description": "Query classification specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec", + "properties": { + "types": { + "description": "Enabled query classification types.", "items": { + "enum": [ + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" + ], + "enumDescriptions": [ + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." + ], "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec": { + "description": "Query rephraser specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec", + "properties": { + "disable": { + "description": "Disable query rephraser.", + "type": "boolean" }, - "pendingCount": { - "description": "Total number of URIs that have yet to be crawled.", + "maxRephraseSteps": { + "description": "Max rephrase steps. The max number is 10 steps. If not set or set to \u003c 1, it will be set to 1 by default.", "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec": { + "description": "Related questions specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec", + "properties": { + "enable": { + "description": "Enable related questions feature if true.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec": { + "description": "Safety specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec", + "properties": { + "enable": { + "description": "Enable the safety filtering on the answer response. It is false by default.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec": { + "description": "Search specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec", + "properties": { + "searchParams": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams", + "description": "Search parameters." }, - "quotaExceededCount": { - "description": "Total number of URIs that were rejected due to insufficient indexing resources.", - "format": "int32", - "type": "integer" + "searchResultList": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList", + "description": "Search result list." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams": { + "description": "Search parameters.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams", + "properties": { + "boostSpec": { + "$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)" }, - "successCount": { - "description": "Total number of URIs that have been crawled so far.", + "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" + }, + "maxReturnResults": { + "description": "Number of search results to return. The default value is 10.", "format": "int32", "type": "integer" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "orderBy": { + "description": "The order in which documents are returned. Documents can be ordered by a field in an Document object. Leave it unset if ordered by relevance. `order_by` expression is case-sensitive. For more information on ordering, see [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order) If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList": { + "description": "Search result list.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList", + "properties": { + "searchResults": { + "description": "Search results.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult": { + "description": "Search result.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult", + "properties": { + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "description": "Chunk information." + }, + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", + "description": "Unstructured document information." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo", + "properties": { + "chunk": { + "description": "Chunk resource name.", "type": "string" }, - "validUrisCount": { - "description": "Total number of unique URIs in the request that are not in invalid_uris.", - "format": "int32", - "type": "integer" + "content": { + "description": "Chunk textual content.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse": { - "description": "Response message for SiteSearchEngineService.RecrawlUris method.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo", "properties": { - "failedUris": { - "description": "URIs that were not crawled before the LRO terminated.", + "document": { + "description": "Document resource name.", + "type": "string" + }, + "documentContexts": { + "description": "List of document contexts.", "items": { - "type": "string" + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext" }, "type": "array" }, - "failureSamples": { - "description": "Details for a sample of up to 10 `failed_uris`.", + "extractiveAnswers": { + "description": "List of extractive answers.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo" + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo": { - "description": "Details about why a particular URI failed to be crawled. Each FailureInfo contains one FailureReason per CorpusType.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo", - "properties": { - "failureReasons": { - "description": "List of failure reasons by corpus type (e.g. desktop, mobile).", + }, + "extractiveSegments": { + "description": "List of extractive segments.", "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason" + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment" }, "type": "array" }, + "title": { + "description": "Title.", + "type": "string" + }, "uri": { - "description": "URI that failed to be crawled.", + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason": { - "description": "Details about why crawling failed for a particular CorpusType, e.g., DESKTOP and MOBILE crawling may fail for different reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext": { + "description": "Document context.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext", "properties": { - "corpusType": { - "description": "DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED.", - "enum": [ - "CORPUS_TYPE_UNSPECIFIED", - "DESKTOP", - "MOBILE" - ], - "enumDescriptions": [ - "Default value.", - "Denotes a crawling attempt for the desktop version of a page.", - "Denotes a crawling attempt for the mobile version of a page." - ], + "content": { + "description": "Document content.", "type": "string" }, - "errorMessage": { - "description": "Reason why the URI was not crawled.", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSchema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1alphaSchema", + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer": { + "description": "Extractive answer. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer", "properties": { - "fieldConfigs": { - "description": "Output only. Configurations for fields of the schema.", - "items": { - "$ref": "GoogleCloudDiscoveryengineV1alphaFieldConfig" - }, - "readOnly": true, - "type": "array" + "content": { + "description": "Extractive answer content.", + "type": "string" }, - "jsonSchema": { - "description": "The JSON representation of the schema.", + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment": { + "description": "Extractive segment. [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment", + "properties": { + "content": { + "description": "Extractive segment content.", "type": "string" }, - "name": { - "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + "pageIdentifier": { + "description": "Page identifier.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse": { + "description": "Response message for ConversationalSearchService.AnswerQuery method.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse", + "properties": { + "answer": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswer", + "description": "Answer resource object. If AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API." }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" + "session": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession", + "description": "Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo": { + "description": "Query understanding information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo", + "properties": { + "queryClassificationInfo": { + "description": "Query classification information.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo" }, - "description": "The structured representation of the schema.", - "type": "object" + "type": "array" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo": { - "description": "Verification information for target sites in advanced site search.", - "id": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", + "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo": { + "description": "Query classification information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo", "properties": { - "siteVerificationState": { - "description": "Site verification state indicating the ownership and validity.", + "positive": { + "description": "Classification output.", + "type": "boolean" + }, + "type": { + "description": "Query classification type.", "enum": [ - "SITE_VERIFICATION_STATE_UNSPECIFIED", - "VERIFIED", - "UNVERIFIED", - "EXEMPTED" + "TYPE_UNSPECIFIED", + "ADVERSARIAL_QUERY", + "NON_ANSWER_SEEKING_QUERY" ], "enumDescriptions": [ - "Defaults to VERIFIED.", - "Site ownership verified.", - "Site ownership pending verification or verification failed.", - "Site exempt from verification, e.g., a public website that opens to all." + "Unspecified query classification type.", + "Adversarial query classification type.", + "Non-answer-seeking query classification type." ], "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerReference": { + "description": "Reference.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerReference", + "properties": { + "chunkInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo", + "description": "Chunk information." }, - "verifyTime": { - "description": "Latest site verification time.", - "format": "google-datetime", - "type": "string" + "unstructuredDocumentInfo": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo", + "description": "Unstructured document information." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSite": { - "description": "A target site for the SiteSearchEngine.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSite", + "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo", "properties": { - "exactMatch": { - "description": "Input only. If set to false, a uri_pattern is generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern is generated to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern is always normalized to generate the URI pattern to be used by the search engine.", - "type": "boolean" + "chunk": { + "description": "Chunk resource name.", + "type": "string" }, - "failureReason": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", - "description": "Output only. Failure reason.", - "readOnly": true + "content": { + "description": "Chunk textual content.", + "type": "string" }, - "generatedUriPattern": { - "description": "Output only. This is system-generated based on the provided_uri_pattern.", - "readOnly": true, + "documentMetadata": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata", + "description": "Document metadata." + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata": { + "description": "Document metadata.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata", + "properties": { + "document": { + "description": "Document resource name.", "type": "string" }, - "indexingStatus": { - "description": "Output only. Indexing status.", - "enum": [ - "INDEXING_STATUS_UNSPECIFIED", - "PENDING", - "FAILED", - "SUCCEEDED", - "DELETING" - ], - "enumDescriptions": [ - "Defaults to SUCCEEDED.", - "The target site is in the update queue and will be picked up by indexing pipeline.", - "The target site fails to be indexed.", - "The target site has been indexed.", - "The previously indexed target site has been marked to be deleted. This is a transitioning state which will resulted in either: 1. target site deleted if unindexing is successful; 2. state reverts to SUCCEEDED if the unindexing fails." - ], - "readOnly": true, + "pageIdentifier": { + "description": "Page identifier.", "type": "string" }, - "name": { - "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", - "readOnly": true, + "title": { + "description": "Title.", "type": "string" }, - "providedUriPattern": { - "description": "Required. Input only. The user provided URI pattern from which the `generated_uri_pattern` is generated.", + "uri": { + "description": "URI for the document.", "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo": { + "description": "Unstructured document information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo", + "properties": { + "chunkContents": { + "description": "List of cited chunk contents derived from document content.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent" + }, + "type": "array" }, - "siteVerificationInfo": { - "$ref": "GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo", - "description": "Output only. Site ownership and validity verification status.", - "readOnly": true + "document": { + "description": "Document resource name.", + "type": "string" }, - "type": { - "description": "The type of the target site, e.g., whether the site is to be included or excluded.", - "enum": [ - "TYPE_UNSPECIFIED", - "INCLUDE", - "EXCLUDE" - ], - "enumDescriptions": [ - "This value is unused. In this case, server behavior defaults to Type.INCLUDE.", - "Include the target site.", - "Exclude the target site." - ], + "title": { + "description": "Title.", "type": "string" }, - "updateTime": { - "description": "Output only. The target site's last updated time.", - "format": "google-datetime", - "readOnly": true, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason": { - "description": "Site search indexing failure reasons.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReason", + "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent": { + "description": "Chunk content.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent", "properties": { - "quotaFailure": { - "$ref": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", - "description": "Failed due to insufficient quota." + "content": { + "description": "Chunk textual content.", + "type": "string" + }, + "pageIdentifier": { + "description": "Page identifier.", + "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure": { - "description": "Failed due to insufficient quota.", - "id": "GoogleCloudDiscoveryengineV1alphaTargetSiteFailureReasonQuotaFailure", + "GoogleCloudDiscoveryengineV1betaAnswerStep": { + "description": "Step information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStep", "properties": { - "totalRequiredQuota": { - "description": "This number is an estimation on how much total quota this project needs to successfully complete indexing.", - "format": "int64", + "actions": { + "description": "Actions.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepAction" + }, + "type": "array" + }, + "description": { + "description": "The description of the step.", + "type": "string" + }, + "state": { + "description": "The state of the step.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "FAILED", + "SUCCEEDED" + ], + "enumDescriptions": [ + "Unknown.", + "Step is currently in progress.", + "Step currently failed.", + "Step has succeeded." + ], + "type": "string" + }, + "thought": { + "description": "The thought of the step.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata": { - "description": "Metadata related to the progress of the TrainCustomModel operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerStepAction": { + "description": "Action.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepAction", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", - "type": "string" + "observation": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation", + "description": "Observation." }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", - "type": "string" + "searchAction": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction", + "description": "Search action." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse": { - "description": "Response of the TrainCustomModelRequest. This message is returned by the google.longrunning.Operations.response field.", - "id": "GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse", + "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation": { + "description": "Observation.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation", "properties": { - "errorConfig": { - "$ref": "GoogleCloudDiscoveryengineV1alphaImportErrorConfig", - "description": "Echoes the destination for the complete errors in the request if set." - }, - "errorSamples": { - "description": "A sample of errors encountered while processing the data.", + "searchResults": { + "description": "Search results observed by the search action, it can be snippets info or chunk info, depending on the citation type set by the user.", "items": { - "$ref": "GoogleRpcStatus" + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult": { + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult", + "properties": { + "chunkInfo": { + "description": "If citation_type is CHUNK_LEVEL_CITATION and chunk mode is on, populate chunk info.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo" }, "type": "array" }, - "metrics": { - "additionalProperties": { - "format": "double", - "type": "number" + "document": { + "description": "Document resource name.", + "type": "string" + }, + "snippetInfo": { + "description": "If citation_type is DOCUMENT_LEVEL_CITATION, populate document level snippets.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo" }, - "description": "The metrics of the trained model.", - "type": "object" + "type": "array" }, - "modelStatus": { - "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving.", + "title": { + "description": "Title.", + "type": "string" + }, + "uri": { + "description": "URI for the document.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata": { - "description": "Metadata associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo": { + "description": "Chunk information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo", "properties": { - "engine": { - "description": "Required. The resource name of the engine that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + "chunk": { + "description": "Chunk resource name.", + "type": "string" + }, + "content": { + "description": "Chunk textual content.", "type": "string" + }, + "relevanceScore": { + "description": "Relevance score.", + "format": "float", + "type": "number" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse": { - "description": "Response associated with a tune operation.", - "id": "GoogleCloudDiscoveryengineV1alphaTuneEngineResponse", - "properties": {}, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata": { - "description": "Metadata for UpdateSchema LRO.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo": { + "description": "Snippet information.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo", "properties": { - "createTime": { - "description": "Operation create time.", - "format": "google-datetime", + "snippet": { + "description": "Snippet content.", "type": "string" }, - "updateTime": { - "description": "Operation last update time. If the operation is done, this is also the finish time.", - "format": "google-datetime", + "snippetStatus": { + "description": "Status of the snippet defined by the search team.", "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { - "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", + "GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction": { + "description": "Search action.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction", "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", + "query": { + "description": "The query to search.", "type": "string" } }, @@ -7368,7 +9330,7 @@ "id": "GoogleCloudDiscoveryengineV1betaBigQuerySource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder.", + "description": "The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document imports: * `document` (default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data. * `custom`: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical.", "type": "string" }, "datasetId": { @@ -7406,40 +9368,41 @@ "type": "object" }, "keyFieldName": { - "description": "The field name used for saving row key value in the UCS document. The name has to match a-zA-Z0-9*", + "description": "The field name used for saving row key value in the document. The name has to match the pattern `a-zA-Z0-9*`.", "type": "string" } }, "type": "object" }, "GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn": { + "description": "The column of the Bigtable.", "id": "GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn", "properties": { "encoding": { - "description": "Optional. The encoding mode of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.", + "description": "The encoding mode of the values when the type is not `STRING`. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", "enum": [ "ENCODING_UNSPECIFIED", "TEXT", "BINARY" ], "enumDescriptions": [ - "", - "", - "" + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." ], "type": "string" }, "fieldName": { - "description": "The field name to use for this column in the UCS document. The name has to match a-zA-Z0-9* If not set, we will parse it from the qualifier bytes with best effort. However, field name collisions could happen, where parsing behavior is undefined.", + "description": "The field name to use for this column in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the qualifier bytes with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", "type": "string" }, "qualifier": { - "description": "Required. Qualifier of the column. If cannot decode with utf-8, store a base-64 encoded string.", + "description": "Required. Qualifier of the column. If it cannot be decoded with utf-8, use a base-64 encoded string instead.", "format": "byte", "type": "string" }, "type": { - "description": "Optional. The type of values in this column family. The values are expected to be encoded using HBase Bytes.toBytes function when the encoding value is set to BINARY.", + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", "enum": [ "TYPE_UNSPECIFIED", "STRING", @@ -7451,14 +9414,14 @@ "JSON" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." ], "type": "string" } @@ -7466,6 +9429,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily": { + "description": "The column family of the Bigtable.", "id": "GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily", "properties": { "columns": { @@ -7476,25 +9440,25 @@ "type": "array" }, "encoding": { - "description": "Optional. The encoding mode of the values when the type is not STRING. Acceptable encoding values are: TEXT - indicates values are alphanumeric text strings. BINARY - indicates values are encoded using HBase Bytes.toBytes family of functions. This can be overridden for a specific column by listing that column in 'columns' and specifying an encoding for it.", + "description": "The encoding mode of the values when the type is not STRING. Acceptable encoding values are: * `TEXT`: indicates values are alphanumeric text strings. * `BINARY`: indicates values are encoded using `HBase Bytes.toBytes` family of functions. This can be overridden for a specific column by listing that column in `columns` and specifying an encoding for it.", "enum": [ "ENCODING_UNSPECIFIED", "TEXT", "BINARY" ], "enumDescriptions": [ - "", - "", - "" + "The encoding is unspecified.", + "Text encoding.", + "Binary encoding." ], "type": "string" }, "fieldName": { - "description": "The field name to use for this column family in the UCS document. The name has to match a-zA-Z0-9* If not set, we will parse it from the family name with best effort. However, due to difference naming pattern, there could be field name collisions, where parsing behavior is undefined.", + "description": "The field name to use for this column family in the document. The name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed from the family name with best effort. However, due to different naming patterns, field name collisions could happen, where parsing behavior is undefined.", "type": "string" }, "type": { - "description": "Optional. The type of values in this column family. The values are expected to be encoded using HBase Bytes.toBytes function when the encoding value is set to BINARY.", + "description": "The type of values in this column family. The values are expected to be encoded using `HBase Bytes.toBytes` function when the encoding value is set to `BINARY`.", "enum": [ "TYPE_UNSPECIFIED", "STRING", @@ -7506,14 +9470,14 @@ "JSON" ], "enumDescriptions": [ - "", - "", - "", - "", - "", - "", - "", - "" + "The type is unspecified.", + "String type.", + "Numerical type.", + "Integer type.", + "Variable length integer type.", + "BigDecimal type.", + "Boolean type.", + "JSON type." ], "type": "string" } @@ -7521,7 +9485,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaBigtableSource": { - "description": "The Cloud Bigtable source for importing data", + "description": "The Cloud Bigtable source for importing data.", "id": "GoogleCloudDiscoveryengineV1betaBigtableSource", "properties": { "bigtableOptions": { @@ -7529,16 +9493,105 @@ "description": "Required. Bigtable options that contains information needed when parsing data into typed structures. For example, column type annotations." }, "instanceId": { - "description": "Required. The instance ID of the Cloud Bigtable that needs to be exported.", + "description": "Required. The instance ID of the Cloud Bigtable that needs to be imported.", "type": "string" }, "projectId": { - "description": "The project ID (can be project # or ID) that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Bigtable source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { - "description": "Required. The table ID of the Cloud Bigtable that needs to be exported.", + "description": "Required. The table ID of the Cloud Bigtable that needs to be imported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCheckGroundingRequest": { + "description": "Request message for GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1betaCheckGroundingRequest", + "properties": { + "answerCandidate": { + "description": "Answer candidate to check.", + "type": "string" + }, + "facts": { + "description": "List of facts for the grounding check. We support up to 200 facts.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaGroundingFact" + }, + "type": "array" + }, + "groundingSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingSpec", + "description": "Configuration of the grounding check." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCheckGroundingResponse": { + "description": "Response message for the GroundedGenerationService.CheckGrounding method.", + "id": "GoogleCloudDiscoveryengineV1betaCheckGroundingResponse", + "properties": { + "citedChunks": { + "description": "List of facts cited across all claims in the answer candidate. These are derived from the facts supplied in the request.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaFactChunk" + }, + "type": "array" + }, + "claims": { + "description": "Claim texts and citation info across all claims in the answer candidate.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim" + }, + "type": "array" + }, + "supportScore": { + "description": "The support score for the input answer candidate. Higher the score, higher is the fraction of claims that are supported by the provided facts. This is always set when a response is returned.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim": { + "description": "Text and citation info for a claim in the answer candidate.", + "id": "GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim", + "properties": { + "citationIndices": { + "description": "A list of indices (into 'cited_chunks') specifying the citations associated with the claim. For instance [1,3,4] means that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts cited supporting for the claim. A citation to a fact indicates that the claim is supported by the fact.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "claimText": { + "description": "Text for the claim in the answer candidate. Always provided regardless of whether citations or anti-citations are found.", "type": "string" + }, + "endPos": { + "description": "Position indicating the end of the claim in the answer candidate, exclusive.", + "format": "int32", + "type": "integer" + }, + "startPos": { + "description": "Position indicating the start of the claim in the answer candidate, measured in bytes/unicode.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaCheckGroundingSpec": { + "description": "Specification for the grounding check.", + "id": "GoogleCloudDiscoveryengineV1betaCheckGroundingSpec", + "properties": { + "citationThreshold": { + "description": "The threshold (in [0,1]) used for determining whether a fact must be cited for a claim in the answer candidate. Choosing a higher threshold will lead to fewer but very strong citations, while choosing a lower threshold may lead to more but somewhat weaker citations. If unset, the threshold will default to 0.6.", + "format": "double", + "type": "number" } }, "type": "object" @@ -7552,7 +9605,7 @@ "type": "string" }, "gcsStagingDir": { - "description": "Optional. Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Please ensure that the Cloud SQL service account has the necessary GCS Storage Admin permissions to access the specified GCS directory.", + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Cloud SQL export to a specific Cloud Storage directory. Please ensure that the Cloud SQL service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", "type": "string" }, "instanceId": { @@ -7560,11 +9613,11 @@ "type": "string" }, "offload": { - "description": "Optional. Option for serverless export. Enabling this option will incur additional cost. More info: https://cloud.google.com/sql/pricing#serverless", + "description": "Option for serverless export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/sql/pricing#serverless).", "type": "boolean" }, "projectId": { - "description": "Optional. The project ID (can be project # or ID) that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" }, "tableId": { @@ -8475,6 +10528,28 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaFactChunk": { + "description": "Fact Chunk.", + "id": "GoogleCloudDiscoveryengineV1betaFactChunk", + "properties": { + "chunkText": { + "description": "Text content of the fact chunk. Can be at most 10K characters long.", + "type": "string" + }, + "source": { + "description": "Source from which this fact chunk was retrieved. If it was retrieved from the GroundingFacts provided in the request then this field will contain the index of the specific fact from which this chunk was retrieved.", + "type": "string" + }, + "sourceMetadata": { + "additionalProperties": { + "type": "string" + }, + "description": "More fine-grained information for the source reference.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse": { "description": "Response message for SiteSearchEngineService.FetchDomainVerificationStatus method.", "id": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse", @@ -8518,7 +10593,7 @@ "id": "GoogleCloudDiscoveryengineV1betaFirestoreSource", "properties": { "collectionId": { - "description": "Required. The Firestore collection to copy the data from with a length limit of 1500 characters.", + "description": "Required. The Firestore collection to copy the data from with a length limit of 1,500 characters.", "type": "string" }, "databaseId": { @@ -8526,11 +10601,11 @@ "type": "string" }, "gcsStagingDir": { - "description": "Optional. Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Please ensure that the Firestore service account has the necessary GCS Storage Admin permissions to access the specified GCS directory.", + "description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the Firestore export to a specific Cloud Storage directory. Please ensure that the Firestore service account has the necessary Cloud Storage Admin permissions to access the specified Cloud Storage directory.", "type": "string" }, "projectId": { - "description": "Optional. The project ID (can be project # or ID) that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", + "description": "The project ID that the Cloud SQL source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", "type": "string" } }, @@ -8541,7 +10616,7 @@ "id": "GoogleCloudDiscoveryengineV1betaGcsSource", "properties": { "dataSchema": { - "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by Gen App Builder. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by Gen App Builder. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", + "description": "The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` becomes a document, with the ID set to the first 128 bits of SHA256(URI) encoded as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical. * `csv`: A CSV file with header conforming to the defined Schema of the data store. Each entry after the header is imported as a Document. This can only be used by the GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.", "type": "string" }, "inputUris": { @@ -8554,12 +10629,19 @@ }, "type": "object" }, - "GoogleCloudDiscoveryengineV1betaGroundingConfig": { - "description": "Grounding configuration.", - "id": "GoogleCloudDiscoveryengineV1betaGroundingConfig", + "GoogleCloudDiscoveryengineV1betaGroundingFact": { + "description": "Grounding Fact.", + "id": "GoogleCloudDiscoveryengineV1betaGroundingFact", "properties": { - "name": { - "description": "Required. Name of the GroundingConfig, of the form `projects/{project}/locations/{location}/groundingConfig`.", + "attributes": { + "additionalProperties": { + "type": "string" + }, + "description": "Attributes associated with the fact. Common attributes include `source` (indicating where the fact was sourced from), `author` (indicating the author of the fact), and so on.", + "type": "object" + }, + "factText": { + "description": "Text content of the fact. Can be at most 10K characters long.", "type": "string" } }, @@ -8584,6 +10666,11 @@ "format": "int64", "type": "string" }, + "totalCount": { + "description": "Total count of entries that were processed.", + "format": "int64", + "type": "string" + }, "updateTime": { "description": "Operation last update time. If the operation is done, this is also the finish time.", "format": "google-datetime", @@ -8597,7 +10684,7 @@ "id": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest", "properties": { "autoGenerateIds": { - "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource", + "description": "Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be specified using id_field, otherwise, documents without IDs fail to be imported. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", "type": "boolean" }, "bigquerySource": { @@ -8629,7 +10716,7 @@ "description": "Cloud Storage location for the input content." }, "idField": { - "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource", + "description": "The field indicates the ID field or column to be used as unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON `{\"my_id\": \"some_uuid\"}`. For others, it may be the column name of the table where the unique ids are stored. The values of the JSON field or the table column are used as the Document.ids. The JSON field or the table column must be of string type, and the values must be set as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs fail to be imported. Only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources. Supported data sources: * GcsSource. GcsSource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource.", "type": "string" }, "inlineSource": { @@ -8653,6 +10740,11 @@ "spannerSource": { "$ref": "GoogleCloudDiscoveryengineV1betaSpannerSource", "description": "Spanner input source." + }, + "updateMask": { + "description": "Indicates which fields in the provided imported documents to update. If not set, the default is to update all fields.", + "format": "google-fieldmask", + "type": "string" } }, "type": "object" @@ -8997,6 +11089,24 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1betaListSessionsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "sessions": { + "description": "All the Sessions for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSession" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse": { "description": "Response message for SiteSearchEngineService.ListTargetSites method.", "id": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse", @@ -9199,6 +11309,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaQuery": { + "description": "Defines a user inputed query.", + "id": "GoogleCloudDiscoveryengineV1betaQuery", + "properties": { + "queryId": { + "description": "Unique Id for the query.", + "type": "string" + }, + "text": { + "description": "Plain text.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaRankRequest": { "description": "Request message for RankService.Rank method.", "id": "GoogleCloudDiscoveryengineV1betaRankRequest", @@ -9216,7 +11341,7 @@ "type": "string" }, "records": { - "description": "Required. A list of records to rank.", + "description": "Required. A list of records to rank. At most 100 records to rank.", "items": { "$ref": "GoogleCloudDiscoveryengineV1betaRankingRecord" }, @@ -9526,7 +11651,7 @@ "type": "string" }, "pageSize": { - "description": "Maximum number of Documents to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 100. Values above 100 are coerced to 100. If this field is negative, an `INVALID_ARGUMENT` is returned.", + "description": "Maximum number of Documents to return. The maximum allowed value depends on the data type. Values above the maximum value are coerced to the maximum value. * Websites with basic indexing: Default `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is negative, an `INVALID_ARGUMENT` is returned.", "format": "int32", "type": "integer" }, @@ -9602,6 +11727,10 @@ "format": "float", "type": "number" }, + "boostControlSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "description": "Complex specification for custom ranking based on customer defined attribute value." + }, "condition": { "description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost documents with document ID \"doc_1\" or \"doc_2\", and color \"Red\" or \"Blue\": `(document_id: ANY(\"doc_1\", \"doc_2\")) AND (color: ANY(\"Red\", \"Blue\"))`", "type": "string" @@ -9609,6 +11738,66 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec": { + "description": "Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec", + "properties": { + "attributeType": { + "description": "The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field_name. In the case of numerical it is straightforward i.e. attribute_value = numerical_field_value. In the case of freshness however, attribute_value = (time.now() - datetime_field_value).", + "enum": [ + "ATTRIBUTE_TYPE_UNSPECIFIED", + "NUMERICAL", + "FRESHNESS" + ], + "enumDescriptions": [ + "Unspecified AttributeType.", + "The value of the numerical field will be used to dynamically update the boost amount. In this case, the attribute_value (the x value) of the control point will be the actual value of the numerical field for which the boost_amount is specified.", + "For the freshness use case the attribute value will be the duration between the current time and the date in the datetime field specified. The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, `T24H`." + ], + "type": "string" + }, + "controlPoints": { + "description": "The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint" + }, + "type": "array" + }, + "fieldName": { + "description": "The name of the field whose value will be used to determine the boost amount.", + "type": "string" + }, + "interpolationType": { + "description": "The interpolation type to be applied to connect the control points listed below.", + "enum": [ + "INTERPOLATION_TYPE_UNSPECIFIED", + "LINEAR" + ], + "enumDescriptions": [ + "Interpolation type is unspecified. In this case, it defaults to Linear.", + "Piecewise linear interpolation will be applied." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint": { + "description": "The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).", + "id": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint", + "properties": { + "attributeValue": { + "description": "Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD `dayTimeDuration` value (a restricted subset of an ISO 8601 duration value). The pattern for this is: `nDnM]`.", + "type": "string" + }, + "boostAmount": { + "description": "The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.", + "format": "float", + "type": "number" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec": { "description": "A specification for configuring the behavior of content search.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec", @@ -10455,6 +12644,67 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaSession": { + "description": "External session proto definition.", + "id": "GoogleCloudDiscoveryengineV1betaSession", + "properties": { + "endTime": { + "description": "Output only. The time the session finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", + "type": "string" + }, + "startTime": { + "description": "Output only. The time the session started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "The state of the session.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS" + ], + "enumDescriptions": [ + "State is unspecified.", + "The session is currently open." + ], + "type": "string" + }, + "turns": { + "description": "Turns.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaSessionTurn" + }, + "type": "array" + }, + "userPseudoId": { + "description": "A unique identifier for tracking users.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaSessionTurn": { + "description": "Represents a turn, including a query from the user and a answer from service.", + "id": "GoogleCloudDiscoveryengineV1betaSessionTurn", + "properties": { + "answer": { + "description": "The resource name of the answer to the user query.", + "type": "string" + }, + "query": { + "$ref": "GoogleCloudDiscoveryengineV1betaQuery", + "description": "The user query." + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaSiteSearchEngine": { "description": "SiteSearchEngine captures DataStore level site search persisting configurations. It is a singleton value per data store.", "id": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine", @@ -10503,7 +12753,7 @@ "type": "string" }, "enableDataBoost": { - "description": "Optional. Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info: https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas", + "description": "Whether to apply data boost on Spanner export. Enabling this option will incur additional cost. More info can be found [here](https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas).", "type": "boolean" }, "instanceId": { @@ -10741,7 +12991,7 @@ "type": "object" }, "modelStatus": { - "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training is in progress. * **ready**: The model is ready for serving.", + "description": "The trained model status. Possible values are: * **bad-data**: The training data quality is bad. * **no-improvement**: Tuning didn't improve performance. Won't deploy. * **in-progress**: Model training job creation is in progress. * **training**: Model is actively training. * **evaluating**: The model is evaluating trained metrics. * **indexing**: The model trained metrics are indexing. * **ready**: The model is ready for serving.", "type": "string" } }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index a1d1222a3e1..2fdb838c7ac 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -174,6 +174,7 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.Collections = NewProjectsLocationsCollectionsService(s) rs.DataStores = NewProjectsLocationsDataStoresService(s) + rs.GroundingConfigs = NewProjectsLocationsGroundingConfigsService(s) rs.Operations = NewProjectsLocationsOperationsService(s) rs.RankingConfigs = NewProjectsLocationsRankingConfigsService(s) return rs @@ -186,6 +187,8 @@ type ProjectsLocationsService struct { DataStores *ProjectsLocationsDataStoresService + GroundingConfigs *ProjectsLocationsGroundingConfigsService + Operations *ProjectsLocationsOperationsService RankingConfigs *ProjectsLocationsRankingConfigsService @@ -241,6 +244,7 @@ func NewProjectsLocationsCollectionsDataStoresService(s *Service) *ProjectsLocat rs.Operations = NewProjectsLocationsCollectionsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsCollectionsDataStoresSchemasService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsDataStoresServingConfigsService(s) + rs.Sessions = NewProjectsLocationsCollectionsDataStoresSessionsService(s) rs.SiteSearchEngine = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsCollectionsDataStoresUserEventsService(s) @@ -262,6 +266,8 @@ type ProjectsLocationsCollectionsDataStoresService struct { ServingConfigs *ProjectsLocationsCollectionsDataStoresServingConfigsService + Sessions *ProjectsLocationsCollectionsDataStoresSessionsService + SiteSearchEngine *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService SuggestionDenyListEntries *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService @@ -371,6 +377,27 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsService struct { s *Service } +func NewProjectsLocationsCollectionsDataStoresSessionsService(s *Service) *ProjectsLocationsCollectionsDataStoresSessionsService { + rs := &ProjectsLocationsCollectionsDataStoresSessionsService{s: s} + rs.Answers = NewProjectsLocationsCollectionsDataStoresSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsCollectionsDataStoresSessionsService struct { + s *Service + + Answers *ProjectsLocationsCollectionsDataStoresSessionsAnswersService +} + +func NewProjectsLocationsCollectionsDataStoresSessionsAnswersService(s *Service) *ProjectsLocationsCollectionsDataStoresSessionsAnswersService { + rs := &ProjectsLocationsCollectionsDataStoresSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsCollectionsDataStoresSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsCollectionsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineService{s: s} rs.Operations = NewProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService(s) @@ -439,6 +466,7 @@ func NewProjectsLocationsCollectionsEnginesService(s *Service) *ProjectsLocation rs.Conversations = NewProjectsLocationsCollectionsEnginesConversationsService(s) rs.Operations = NewProjectsLocationsCollectionsEnginesOperationsService(s) rs.ServingConfigs = NewProjectsLocationsCollectionsEnginesServingConfigsService(s) + rs.Sessions = NewProjectsLocationsCollectionsEnginesSessionsService(s) return rs } @@ -450,6 +478,8 @@ type ProjectsLocationsCollectionsEnginesService struct { Operations *ProjectsLocationsCollectionsEnginesOperationsService ServingConfigs *ProjectsLocationsCollectionsEnginesServingConfigsService + + Sessions *ProjectsLocationsCollectionsEnginesSessionsService } func NewProjectsLocationsCollectionsEnginesConversationsService(s *Service) *ProjectsLocationsCollectionsEnginesConversationsService { @@ -479,6 +509,27 @@ type ProjectsLocationsCollectionsEnginesServingConfigsService struct { s *Service } +func NewProjectsLocationsCollectionsEnginesSessionsService(s *Service) *ProjectsLocationsCollectionsEnginesSessionsService { + rs := &ProjectsLocationsCollectionsEnginesSessionsService{s: s} + rs.Answers = NewProjectsLocationsCollectionsEnginesSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsCollectionsEnginesSessionsService struct { + s *Service + + Answers *ProjectsLocationsCollectionsEnginesSessionsAnswersService +} + +func NewProjectsLocationsCollectionsEnginesSessionsAnswersService(s *Service) *ProjectsLocationsCollectionsEnginesSessionsAnswersService { + rs := &ProjectsLocationsCollectionsEnginesSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsCollectionsEnginesSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsCollectionsOperationsService(s *Service) *ProjectsLocationsCollectionsOperationsService { rs := &ProjectsLocationsCollectionsOperationsService{s: s} return rs @@ -496,6 +547,7 @@ func NewProjectsLocationsDataStoresService(s *Service) *ProjectsLocationsDataSto rs.Operations = NewProjectsLocationsDataStoresOperationsService(s) rs.Schemas = NewProjectsLocationsDataStoresSchemasService(s) rs.ServingConfigs = NewProjectsLocationsDataStoresServingConfigsService(s) + rs.Sessions = NewProjectsLocationsDataStoresSessionsService(s) rs.SiteSearchEngine = NewProjectsLocationsDataStoresSiteSearchEngineService(s) rs.SuggestionDenyListEntries = NewProjectsLocationsDataStoresSuggestionDenyListEntriesService(s) rs.UserEvents = NewProjectsLocationsDataStoresUserEventsService(s) @@ -517,6 +569,8 @@ type ProjectsLocationsDataStoresService struct { ServingConfigs *ProjectsLocationsDataStoresServingConfigsService + Sessions *ProjectsLocationsDataStoresSessionsService + SiteSearchEngine *ProjectsLocationsDataStoresSiteSearchEngineService SuggestionDenyListEntries *ProjectsLocationsDataStoresSuggestionDenyListEntriesService @@ -614,6 +668,27 @@ type ProjectsLocationsDataStoresServingConfigsService struct { s *Service } +func NewProjectsLocationsDataStoresSessionsService(s *Service) *ProjectsLocationsDataStoresSessionsService { + rs := &ProjectsLocationsDataStoresSessionsService{s: s} + rs.Answers = NewProjectsLocationsDataStoresSessionsAnswersService(s) + return rs +} + +type ProjectsLocationsDataStoresSessionsService struct { + s *Service + + Answers *ProjectsLocationsDataStoresSessionsAnswersService +} + +func NewProjectsLocationsDataStoresSessionsAnswersService(s *Service) *ProjectsLocationsDataStoresSessionsAnswersService { + rs := &ProjectsLocationsDataStoresSessionsAnswersService{s: s} + return rs +} + +type ProjectsLocationsDataStoresSessionsAnswersService struct { + s *Service +} + func NewProjectsLocationsDataStoresSiteSearchEngineService(s *Service) *ProjectsLocationsDataStoresSiteSearchEngineService { rs := &ProjectsLocationsDataStoresSiteSearchEngineService{s: s} rs.TargetSites = NewProjectsLocationsDataStoresSiteSearchEngineTargetSitesService(s) @@ -653,6 +728,15 @@ type ProjectsLocationsDataStoresUserEventsService struct { s *Service } +func NewProjectsLocationsGroundingConfigsService(s *Service) *ProjectsLocationsGroundingConfigsService { + rs := &ProjectsLocationsGroundingConfigsService{s: s} + return rs +} + +type ProjectsLocationsGroundingConfigsService struct { + s *Service +} + func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { rs := &ProjectsLocationsOperationsService{s: s} return rs @@ -1950,6 +2034,9 @@ type GoogleCloudDiscoveryengineV1ImportDocumentsMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -2686,19 +2773,103 @@ func (s *GoogleCloudDiscoveryengineV1alphaAclConfig) MarshalJSON() ([]byte, erro return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1alphaAnswer: Defines an answer. +type GoogleCloudDiscoveryengineV1alphaAnswer struct { + // AnswerSkippedReasons: Additional answer-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. + // + // Possible values: + // "ANSWER_SKIPPED_REASON_UNSPECIFIED" - Default value. The answer + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query + // ignored case. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the answer if there are no high-relevance search + // results. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the answer if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` + + // AnswerText: The textual answer. + AnswerText string `json:"answerText,omitempty"` + + // Citations: Citations. + Citations []*GoogleCloudDiscoveryengineV1alphaAnswerCitation `json:"citations,omitempty"` + + // CompleteTime: Output only. Answer completed timestamp. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*/answers/*` + Name string `json:"name,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // QueryUnderstandingInfo: Query understanding information. + QueryUnderstandingInfo *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo `json:"queryUnderstandingInfo,omitempty"` + + // References: References. + References []*GoogleCloudDiscoveryengineV1alphaAnswerReference `json:"references,omitempty"` + + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + + // State: The state of the answer generation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Answer generation is currently in progress. + // "FAILED" - Answer generation currently failed. + // "SUCCEEDED" - Answer generation has succeeded. + State string `json:"state,omitempty"` + + // Steps: Answer generation steps. + Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AnswerSkippedReasons") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "AnswerSkippedReasons") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a +// segment. +type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + + // StartIndex: Index indicates the start of the segment, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2706,7 +2877,7 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "EndIndex") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2715,20 +2886,19 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerCitation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse: -// Response message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerCitationSource: Citation +// source. +type GoogleCloudDiscoveryengineV1alphaAnswerCitationSource struct { + // ReferenceId: ID of the citation source. + ReferenceId string `json:"referenceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetSites") to + // ForceSendFields is a list of field names (e.g. "ReferenceId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2736,7 +2906,7 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSites") to include + // NullFields is a list of field names (e.g. "ReferenceId") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -2745,25 +2915,59 @@ type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerCitationSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query +// understanding information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { + // QueryClassificationInfo: Query classification information. + QueryClassificationInfo []*GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo `json:"queryClassificationInfo,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. + // "QueryClassificationInfo") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // NullFields is a list of field names (e.g. "QueryClassificationInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClas +// sificationInfo: Query classification information. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo struct { + // Positive: Classification output. + Positive bool `json:"positive,omitempty"` + + // Type: Query classification type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query + // classification type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2771,7 +2975,7 @@ type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Positive") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2780,25 +2984,21 @@ type GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfoQueryClassificationInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1alphaAnswerReference: Reference. +type GoogleCloudDiscoveryengineV1alphaAnswerReference struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo `json:"chunkInfo,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2806,7 +3006,7 @@ type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ChunkInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2815,23 +3015,28 @@ type GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo: Chunk +// information. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // DocumentMetadata: Document metadata. + DocumentMetadata *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` + + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -2839,7 +3044,59 @@ type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfo + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetad +// ata: Document metadata. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` + + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -2848,17 +3105,512 @@ type GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceChunkInfoDocumentMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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 { +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentIn +// fo: Unstructured document information. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo struct { + // ChunkContents: List of cited chunk contents derived from document + // content. + ChunkContents []*GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` + + // Document: Document resource name. + Document string `json:"document,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkContents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChunkContents") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentIn +// foChunkContent: Chunk content. +type GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerReferenceUnstructuredDocumentInfoChunkContent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStep: Step information. +type GoogleCloudDiscoveryengineV1alphaAnswerStep struct { + // Actions: Actions. + Actions []*GoogleCloudDiscoveryengineV1alphaAnswerStepAction `json:"actions,omitempty"` + + // Description: The description of the step. + Description string `json:"description,omitempty"` + + // State: The state of the step. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Step is currently in progress. + // "FAILED" - Step currently failed. + // "SUCCEEDED" - Step has succeeded. + State string `json:"state,omitempty"` + + // Thought: The thought of the step. + Thought string `json:"thought,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Actions") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStep + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStepAction: Action. +type GoogleCloudDiscoveryengineV1alphaAnswerStepAction struct { + // Observation: Observation. + Observation *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation `json:"observation,omitempty"` + + // SearchAction: Search action. + SearchAction *GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction `json:"searchAction,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Observation") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Observation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation: +// Observation. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation struct { + // SearchResults: Search results observed by the search action, it can + // be snippets info or chunk info, depending on the citation type set by + // the user. + SearchResults []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult `json:"searchResults,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SearchResults") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SearchResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult struct { + // ChunkInfo: If citation_type is CHUNK_LEVEL_CITATION and chunk mode is + // on, populate chunk info. + ChunkInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo `json:"chunkInfo,omitempty"` + + // Document: Document resource name. + Document string `json:"document,omitempty"` + + // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate + // document level snippets. + SnippetInfo []*GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChunkInfo") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResu +// ltChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` + + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Chunk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultChunkInfo + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResu +// ltSnippetInfo: Snippet information. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo struct { + // Snippet: Snippet content. + Snippet string `json:"snippet,omitempty"` + + // SnippetStatus: Status of the snippet defined by the search team. + SnippetStatus string `json:"snippetStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Snippet") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Snippet") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionObservationSearchResultSnippetInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction: Search +// action. +type GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction struct { + // Query: The query to search. + Query string `json:"query,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Query") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerStepActionSearchAction + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse: +// Response message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1alphaTargetSite `json:"targetSites,omitempty"` + + // ForceSendFields is a list of field names (e.g. "TargetSites") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TargetSites") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateDataStoreMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaCreateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, 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"` @@ -4168,36 +4920,6 @@ func (s *GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1alphaGroundingConfig: Grounding -// configuration. -type GoogleCloudDiscoveryengineV1alphaGroundingConfig struct { - // Name: Required. Name of the GroundingConfig, of the form - // `projects/{project}/locations/{location}/groundingConfig`. - Name string `json:"name,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1alphaGroundingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1alphaGroundingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - // GoogleCloudDiscoveryengineV1alphaIdpConfig: Identity Provider Config. type GoogleCloudDiscoveryengineV1alphaIdpConfig struct { // ExternalIdpConfig: External Identity provider config. @@ -4355,6 +5077,9 @@ type GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata struct { // SuccessCount: Count of entries that were processed successfully. SuccessCount int64 `json:"successCount,omitempty,string"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` + // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -4835,6 +5560,37 @@ func (s *GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse) MarshalJSON() return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaQuery: Defines a user inputed query. +type GoogleCloudDiscoveryengineV1alphaQuery struct { + // QueryId: Unique Id for the query. + QueryId string `json:"queryId,omitempty"` + + // Text: Plain text. + Text string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QueryId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QueryId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaQuery + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata: Metadata // related to the progress of the SiteSearchEngineService.RecrawlUris // operation. This will be returned by the @@ -5039,6 +5795,88 @@ func (s *GoogleCloudDiscoveryengineV1alphaSchema) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaSession: External session proto +// definition. +type GoogleCloudDiscoveryengineV1alphaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*` + Name string `json:"name,omitempty"` + + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` + + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSession + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaSessionTurn: Represents a turn, +// including a query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1alphaSessionTurn struct { + // Answer: The resource name of the answer to the user query. + Answer string `json:"answer,omitempty"` + + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1alphaQuery `json:"query,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1alphaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaSessionTurn + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo: Verification // information for target sites in advanced site search. type GoogleCloudDiscoveryengineV1alphaSiteVerificationInfo struct { @@ -5278,8 +6116,10 @@ type GoogleCloudDiscoveryengineV1alphaTrainCustomModelResponse struct { // ModelStatus: The trained model status. Possible values are: * // **bad-data**: The training data quality is bad. * **no-improvement**: // Tuning didn't improve performance. Won't deploy. * **in-progress**: - // Model training is in progress. * **ready**: The model is ready for - // serving. + // Model training job creation is in progress. * **training**: Model is + // actively training. * **evaluating**: The model is evaluating trained + // metrics. * **indexing**: The model trained metrics are indexing. * + // **ready**: The model is ready for serving. ModelStatus string `json:"modelStatus,omitempty"` // ForceSendFields is a list of field names (e.g. "ErrorConfig") to @@ -5410,50 +6250,107 @@ func (s *GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata) MarshalJSON( return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.BatchCreateTargetSites operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1betaAnswer: Defines an answer. +type GoogleCloudDiscoveryengineV1betaAnswer struct { + // AnswerSkippedReasons: Additional answer-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. + // + // Possible values: + // "ANSWER_SKIPPED_REASON_UNSPECIFIED" - Default value. The answer + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // "NON_ANSWER_SEEKING_QUERY_IGNORED" - The non-answer seeking query + // ignored case. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the answer if there are no high-relevance search + // results. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the answer if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + AnswerSkippedReasons []string `json:"answerSkippedReasons,omitempty"` + + // AnswerText: The textual answer. + AnswerText string `json:"answerText,omitempty"` + + // Citations: Citations. + Citations []*GoogleCloudDiscoveryengineV1betaAnswerCitation `json:"citations,omitempty"` + + // CompleteTime: Output only. Answer completed timestamp. + CompleteTime string `json:"completeTime,omitempty"` + + // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*/answers/*` + Name string `json:"name,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. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // QueryUnderstandingInfo: Query understanding information. + QueryUnderstandingInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo `json:"queryUnderstandingInfo,omitempty"` + + // References: References. + References []*GoogleCloudDiscoveryengineV1betaAnswerReference `json:"references,omitempty"` + + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + + // State: The state of the answer generation. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Answer generation is currently in progress. + // "FAILED" - Answer generation currently failed. + // "SUCCEEDED" - Answer generation has succeeded. + State string `json:"state,omitempty"` + + // Steps: Answer generation steps. + Steps []*GoogleCloudDiscoveryengineV1betaAnswerStep `json:"steps,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. + // "AnswerSkippedReasons") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AnswerSkippedReasons") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest: -// Request message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { - // Requests: Required. The request message specifying the resources to - // create. A maximum of 20 TargetSites can be created in a batch. - Requests []*GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest `json:"requests,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a +// segment. +type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Requests") to + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` + + // StartIndex: Index indicates the start of the segment, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5461,7 +6358,7 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Requests") to include in + // NullFields is a list of field names (e.g. "EndIndex") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5470,20 +6367,19 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest +func (s *GoogleCloudDiscoveryengineV1betaAnswerCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: -// Response message for SiteSearchEngineService.BatchCreateTargetSites -// method. -type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { - // TargetSites: TargetSites created. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerCitationSource: Citation +// source. +type GoogleCloudDiscoveryengineV1betaAnswerCitationSource struct { + // ReferenceId: ID of the citation source. + ReferenceId string `json:"referenceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetSites") to + // ForceSendFields is a list of field names (e.g. "ReferenceId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5491,7 +6387,7 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetSites") to include + // NullFields is a list of field names (e.g. "ReferenceId") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -5500,152 +6396,151 @@ type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerCitationSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: -// Request message for SiteSearchEngineService.BatchVerifyTargetSites -// method. -type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { -} +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequest: Request message +// for ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { + // AnswerGenerationSpec: Answer generation specification. + AnswerGenerationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec `json:"answerGenerationSpec,omitempty"` -// GoogleCloudDiscoveryengineV1betaBigQuerySource: BigQuery source -// import data from. -type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for user event imports: * `user_event` (default): - // One UserEvent per row. Supported values for document imports: * - // `document` (default): One Document format per row. Each document must - // have a valid Document.id and one of Document.json_data or - // Document.struct_data. * `custom`: One custom data per row in - // arbitrary format that conforms to the defined Schema of the data - // store. This can only be used by Gen App Builder. - DataSchema string `json:"dataSchema,omitempty"` + // AsynchronousMode: Asynchronous mode control. If enabled, the response + // will be returned with answer/session resource name without final + // answer. The API users need to do the polling to get the latest status + // of answer/session by calling ConversationalSearchService.GetAnswer or + // ConversationalSearchService.GetSession method. + AsynchronousMode bool `json:"asynchronousMode,omitempty"` - // DatasetId: Required. The BigQuery data set to copy the data from with - // a length limit of 1,024 characters. - DatasetId string `json:"datasetId,omitempty"` + // Query: Required. Current user query. + Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the - // import with a length limit of 2,000 characters. Can be specified if - // one wants to have the BigQuery export to a specific Cloud Storage - // directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // QueryUnderstandingSpec: Query understanding specification. + QueryUnderstandingSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec `json:"queryUnderstandingSpec,omitempty"` - // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in - // YYYY-MM-DD format. - PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` + // RelatedQuestionsSpec: Related questions specification. + RelatedQuestionsSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec `json:"relatedQuestionsSpec,omitempty"` - // ProjectId: The project ID (can be project # or ID) that the BigQuery - // source is in with a length limit of 128 characters. If not specified, - // inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` + // SafetySpec: Model specification. + SafetySpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec `json:"safetySpec,omitempty"` - // TableId: Required. The BigQuery table to copy the data from with a - // length limit of 1,024 characters. - TableId string `json:"tableId,omitempty"` + // SearchSpec: Search specification. + SearchSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec `json:"searchSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // Session: The session resource name. Not required. When session field + // is not set, the API is in sessionless mode. We support auto session + // mode: users can use the wildcard symbol “-” as session id. A new + // id will be automatically generated and assigned. + Session string `json:"session,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. The field must be a UTF-8 encoded string with a + // length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "AnswerGenerationSpec") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSchema") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AnswerGenerationSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBigQuerySource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigQuerySource +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableOptions: The Bigtable Options -// object that contains information to support the import. -type GoogleCloudDiscoveryengineV1betaBigtableOptions struct { - // Families: The mapping from family names to an object that contains - // column families level information for the given column family. If a - // family is not present in this map it will be ignored. - Families map[string]GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec +// : Answer generation specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec struct { + // AnswerLanguageCode: Language code for Answer. Use language tags + // defined by BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). + // Note: This is an experimental feature. + AnswerLanguageCode string `json:"answerLanguageCode,omitempty"` - // KeyFieldName: The field name used for saving row key value in the UCS - // document. The name has to match a-zA-Z0-9* - KeyFieldName string `json:"keyFieldName,omitempty"` + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial + // queries. The default value is `false`. Google employs search-query + // classification to detect adversarial queries. No answer is returned + // if the search query is classified as an adversarial query. For + // example, a user might ask a question regarding negative comments + // about the company or submit a query designed to generate unsafe, + // policy-violating output. If this field is set to `true`, we skip + // generating answers for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Families") to - // unconditionally include in API requests. By default, fields with + // IgnoreNonAnswerSeekingQuery: Specifies whether to filter out queries + // that are not answer-seeking. The default value is `false`. Google + // employs search-query classification to detect answer-seeking queries. + // No answer is returned if the search query is classified as a + // non-answer seeking query. If this field is set to `true`, we skip + // generating answers for non-answer seeking queries and return fallback + // messages instead. + IgnoreNonAnswerSeekingQuery bool `json:"ignoreNonAnswerSeekingQuery,omitempty"` + + // IncludeCitations: Specifies whether to include citation metadata in + // the answer. The default value is `false`. + IncludeCitations bool `json:"includeCitations,omitempty"` + + // ModelSpec: Answer generation model specification. + ModelSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec `json:"modelSpec,omitempty"` + + // PromptSpec: Answer generation prompt specification. + PromptSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec `json:"promptSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerLanguageCode") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Families") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AnswerLanguageCode") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBigtableOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptions +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn struct { - // Encoding: Optional. The encoding mode of the values when the type is - // not STRING. Acceptable encoding values are: TEXT - indicates values - // are alphanumeric text strings. BINARY - indicates values are encoded - // using HBase Bytes.toBytes family of functions. This can be overridden - // for a specific column by listing that column in 'columns' and - // specifying an encoding for it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - // "TEXT" - // "BINARY" - Encoding string `json:"encoding,omitempty"` - - // FieldName: The field name to use for this column in the UCS document. - // The name has to match a-zA-Z0-9* If not set, we will parse it from - // the qualifier bytes with best effort. However, field name collisions - // could happen, where parsing behavior is undefined. - FieldName string `json:"fieldName,omitempty"` - - // Qualifier: Required. Qualifier of the column. If cannot decode with - // utf-8, store a base-64 encoded string. - Qualifier string `json:"qualifier,omitempty"` - - // Type: Optional. The type of values in this column family. The values - // are expected to be encoded using HBase Bytes.toBytes function when - // the encoding value is set to BINARY. - // - // Possible values: - // "TYPE_UNSPECIFIED" - // "STRING" - // "NUMBER" - // "INTEGER" - // "VAR_INTEGER" - // "BIG_NUMERIC" - // "BOOLEAN" - // "JSON" - Type string `json:"type,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec +// ModelSpec: Answer Generation Model specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec struct { + // ModelVersion: Model version. If not set, it will use the default + // stable model. Allowed values are: stable, preview. + ModelVersion string `json:"modelVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "Encoding") to + // ForceSendFields is a list of field names (e.g. "ModelVersion") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5653,63 +6548,28 @@ type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Encoding") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ModelVersion") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecModelSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct { - // Columns: The list of objects that contains column level information - // for each column. If a column is not present in this list it will be - // ignored. - Columns []*GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn `json:"columns,omitempty"` - - // Encoding: Optional. The encoding mode of the values when the type is - // not STRING. Acceptable encoding values are: TEXT - indicates values - // are alphanumeric text strings. BINARY - indicates values are encoded - // using HBase Bytes.toBytes family of functions. This can be overridden - // for a specific column by listing that column in 'columns' and - // specifying an encoding for it. - // - // Possible values: - // "ENCODING_UNSPECIFIED" - // "TEXT" - // "BINARY" - Encoding string `json:"encoding,omitempty"` - - // FieldName: The field name to use for this column family in the UCS - // document. The name has to match a-zA-Z0-9* If not set, we will parse - // it from the family name with best effort. However, due to difference - // naming pattern, there could be field name collisions, where parsing - // behavior is undefined. - FieldName string `json:"fieldName,omitempty"` - - // Type: Optional. The type of values in this column family. The values - // are expected to be encoded using HBase Bytes.toBytes function when - // the encoding value is set to BINARY. - // - // Possible values: - // "TYPE_UNSPECIFIED" - // "STRING" - // "NUMBER" - // "INTEGER" - // "VAR_INTEGER" - // "BIG_NUMERIC" - // "BOOLEAN" - // "JSON" - Type string `json:"type,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpec +// PromptSpec: Answer generation prompt specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec struct { + // Preamble: Customized preamble. + Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "Columns") to + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5717,7 +6577,7 @@ type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Columns") to include in + // NullFields is a list of field names (e.g. "Preamble") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5726,91 +6586,92 @@ type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestAnswerGenerationSpecPromptSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaBigtableSource: The Cloud Bigtable -// source for importing data -type GoogleCloudDiscoveryengineV1betaBigtableSource struct { - // BigtableOptions: Required. Bigtable options that contains information - // needed when parsing data into typed structures. For example, column - // type annotations. - BigtableOptions *GoogleCloudDiscoveryengineV1betaBigtableOptions `json:"bigtableOptions,omitempty"` - - // InstanceId: Required. The instance ID of the Cloud Bigtable that - // needs to be exported. - InstanceId string `json:"instanceId,omitempty"` - - // ProjectId: The project ID (can be project # or ID) that the Bigtable - // source is in with a length limit of 128 characters. If not specified, - // inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSp +// ec: Query understanding specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec struct { + // QueryClassificationSpec: Query classification specification. + QueryClassificationSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec `json:"queryClassificationSpec,omitempty"` - // TableId: Required. The table ID of the Cloud Bigtable that needs to - // be exported. - TableId string `json:"tableId,omitempty"` + // QueryRephraserSpec: Query rephraser specification. + QueryRephraserSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec `json:"queryRephraserSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "BigtableOptions") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "QueryClassificationSpec") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigtableOptions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "QueryClassificationSpec") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaBigtableSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaBigtableSource +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCloudSqlSource: Cloud SQL source -// import data from. -type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { - // DatabaseId: Required. The Cloud SQL database to copy the data from - // with a length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSp +// ecQueryClassificationSpec: Query classification specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec struct { + // Types: Enabled query classification types. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query + // classification type. + Types []string `json:"types,omitempty"` - // GcsStagingDir: Optional. Intermediate Cloud Storage directory used - // for the import with a length limit of 2,000 characters. Can be - // specified if one wants to have the Cloud SQL export to a specific - // Cloud Storage directory. Please ensure that the Cloud SQL service - // account has the necessary GCS Storage Admin permissions to access the - // specified GCS directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // ForceSendFields is a list of field names (e.g. "Types") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // InstanceId: Required. The Cloud SQL instance to copy the data from - // with a length limit of 256 characters. - InstanceId string `json:"instanceId,omitempty"` + // NullFields is a list of field names (e.g. "Types") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Offload: Optional. Option for serverless export. Enabling this option - // will incur additional cost. More info: - // https://cloud.google.com/sql/pricing#serverless - Offload bool `json:"offload,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryClassificationSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ProjectId: Optional. The project ID (can be project # or ID) that the - // Cloud SQL source is in with a length limit of 128 characters. If not - // specified, inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSp +// ecQueryRephraserSpec: Query rephraser specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec struct { + // Disable: Disable query rephraser. + Disable bool `json:"disable,omitempty"` - // TableId: Required. The Cloud SQL table to copy the data from with a - // length limit of 256 characters. - TableId string `json:"tableId,omitempty"` + // MaxRephraseSteps: Max rephrase steps. The max number is 10 steps. If + // not set or set to < 1, it will be set to 1 by default. + MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseId") to + // ForceSendFields is a list of field names (e.g. "Disable") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5818,7 +6679,7 @@ type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in + // NullFields is a list of field names (e.g. "Disable") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5827,30 +6688,19 @@ type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCloudSqlSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCloudSqlSource +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompleteQueryResponse: Response -// message for CompletionService.CompleteQuery method. -type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { - // QuerySuggestions: Results of the matched query suggestions. The - // result list is ordered and the first result is a top suggestion. - QuerySuggestions []*GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` - - // TailMatchTriggered: True if the returned suggestions are all tail - // suggestions. For tail matching to be triggered, - // include_tail_suggestions in the request must be true and there must - // be no suggestions that match the full query. - TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec +// : Related questions specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec struct { + // Enable: Enable related questions feature if true. + Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to + // ForceSendFields is a list of field names (e.g. "Enable") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5858,73 +6708,61 @@ type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuerySuggestions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponse +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion: -// Suggestions as search queries. -type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct { - // CompletableFieldPaths: The unique document field paths that serve as - // the source of this suggestion if it was generated from completable - // fields. This field is only populated for the document-completable - // model. - CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` - - // Suggestion: The suggestion for the query. - Suggestion string `json:"suggestion,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec: Safety +// specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec struct { + // Enable: Enable the safety filtering on the answer response. It is + // false by default. + Enable bool `json:"enable,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "CompletableFieldPaths") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Enable") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompletableFieldPaths") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Enable") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCompletionInfo: Detailed completion -// information including completion attribution token and clicked -// completion info. -type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { - // SelectedPosition: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion position, starting - // from 0. - SelectedPosition int64 `json:"selectedPosition,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec: Search +// specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec struct { + // SearchParams: Search parameters. + SearchParams *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams `json:"searchParams,omitempty"` - // SelectedSuggestion: End user selected - // CompleteQueryResponse.QuerySuggestion.suggestion. - SelectedSuggestion string `json:"selectedSuggestion,omitempty"` + // SearchResultList: Search result list. + SearchResultList *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList `json:"searchResultList,omitempty"` - // ForceSendFields is a list of field names (e.g. "SelectedPosition") to + // ForceSendFields is a list of field names (e.g. "SearchParams") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5932,57 +6770,58 @@ type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SelectedPosition") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "SearchParams") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCompletionInfo +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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 - // `project/*/locations/global/collections/{collection}/dataStore/*/conve - // rsations/*` or - // `project/*/locations/global/collections/{collection}/engines/*/convers - // ations/*`. - Name string `json:"name,omitempty"` - - // StartTime: Output only. The time the conversation started. - StartTime string `json:"startTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchPara +// ms: Search parameters. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams struct { + // BoostSpec: Boost specification to boost certain documents in search + // results which may affect the answer query response. For more + // information on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - // 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"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. This will be + // used to filter search results which may affect the Answer response. + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + // Filtering in Vertex AI Search is done by mapping the LHS filter key + // to a key property defined in the Vertex AI Search backend -- this + // mapping is defined by the customer in their schema. For example a + // media customers might have a field 'name' in their schema. In this + // case the filter would look like this: filter --> name:'ANY("king + // kong")' For more information about filtering including syntax and + // filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` - // UserPseudoId: A unique identifier for tracking users. - UserPseudoId string `json:"userPseudoId,omitempty"` + // MaxReturnResults: Number of search results to return. The default + // value is 10. + MaxReturnResults int64 `json:"maxReturnResults,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // OrderBy: The order in which documents are returned. Documents can be + // ordered by a field in an Document object. Leave it unset if ordered + // by relevance. `order_by` expression is case-sensitive. For more + // information on ordering, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this + // field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -5990,7 +6829,7 @@ type GoogleCloudDiscoveryengineV1betaConversation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in + // NullFields is a list of field names (e.g. "BoostSpec") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -5999,24 +6838,19 @@ type GoogleCloudDiscoveryengineV1betaConversation struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversation +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchParams raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltList: Search result list. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList struct { + // SearchResults: Search results. + SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult `json:"searchResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "ActiveDocument") to + // ForceSendFields is a list of field names (e.g. "SearchResults") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6024,35 +6858,31 @@ type GoogleCloudDiscoveryengineV1betaConversationContext struct { // This may be used to include empty fields in Patch requests. 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. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "SearchResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResult: Search result. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo `json:"chunkInfo,omitempty"` - // UserInput: User text input. - UserInput *GoogleCloudDiscoveryengineV1betaTextInput `json:"userInput,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6060,7 +6890,7 @@ type GoogleCloudDiscoveryengineV1betaConversationMessage struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ChunkInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6069,75 +6899,67 @@ type GoogleCloudDiscoveryengineV1betaConversationMessage struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResultChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,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"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. Filter expression is case-sensitive. This will be - // used to filter search results which may affect the summary response. - // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. - // Filtering in Vertex AI Search is done by mapping the LHS filter key - // to a key property defined in the Vertex AI Search backend -- this - // mapping is defined by the customer in their schema. For example a - // media customer might have a field 'name' in their schema. In this - // case the filter would look like this: filter --> name:'ANY("king - // kong")' For more information about filtering including syntax and - // filter operators, see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` + // ForceSendFields is a list of field names (e.g. "Chunk") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // Query: Required. Current user input. - Query *GoogleCloudDiscoveryengineV1betaTextInput `json:"query,omitempty"` + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // SafeSearch: Whether to turn on safe search. - SafeSearch bool `json:"safeSearch,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultChunkInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ServingConfig: The resource name of the Serving Config to use. - // Format: - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` - // If this is not set, the default serving config will be used. - ServingConfig string `json:"servingConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResultUnstructuredDocumentInfo: Unstructured document +// information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` - // SummarySpec: A specification for configuring the summary returned in - // the response. - SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // DocumentContexts: List of document contexts. + DocumentContexts []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext `json:"documentContexts,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"` + // ExtractiveAnswers: List of extractive answers. + ExtractiveAnswers []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer `json:"extractiveAnswers,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // ExtractiveSegments: List of extractive segments. + ExtractiveSegments []*GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment `json:"extractiveSegments,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6145,7 +6967,7 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") to include in + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6154,33 +6976,23 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationRequest +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaConverseConversationResponse: -// Response message for ConversationalSearchService.ConverseConversation -// method. -type GoogleCloudDiscoveryengineV1betaConverseConversationResponse struct { - // Conversation: Updated conversation including the answer. - Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` - - // RelatedQuestions: Suggested related questions. - RelatedQuestions []string `json:"relatedQuestions,omitempty"` - - // Reply: Answer to the current query. - Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` - - // SearchResults: Search Results. - SearchResults []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"searchResults,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResultUnstructuredDocumentInfoDocumentContext: Document +// context. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext struct { + // Content: Document content. + Content string `json:"content,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "Conversation") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6188,34 +7000,33 @@ type GoogleCloudDiscoveryengineV1betaConverseConversationResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversation") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaConverseConversationResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationResponse +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoDocumentContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResultUnstructuredDocumentInfoExtractiveAnswer: +// Extractive answer. Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers) +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer struct { + // Content: Extractive answer content. + Content string `json:"content,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6223,7 +7034,7 @@ type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6232,25 +7043,24 @@ type GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveAnswer raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResu +// ltListSearchResultUnstructuredDocumentInfoExtractiveSegment: +// Extractive segment. Guide +// (https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments) +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment struct { + // Content: Extractive segment content. + Content string `json:"content,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6258,7 +7068,7 @@ type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6267,23 +7077,30 @@ type GoogleCloudDiscoveryengineV1betaCreateEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSearchSpecSearchResultListSearchResultUnstructuredDocumentInfoExtractiveSegment raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for -// Create Schema LRO. -type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryResponse: Response message +// for ConversationalSearchService.AnswerQuery method. +type GoogleCloudDiscoveryengineV1betaAnswerQueryResponse struct { + // Answer: Answer resource object. If + // AnswerQueryRequest.StepSpec.max_step_count is greater than 1, use + // Answer.name to fetch answer information using + // ConversationalSearchService.GetAnswer API. + Answer *GoogleCloudDiscoveryengineV1betaAnswer `json:"answer,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Session: Session resource object. It will be only available when + // session field is set and valid in the AnswerQueryRequest request. + Session *GoogleCloudDiscoveryengineV1betaSession `json:"session,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Answer") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6291,8 +7108,8 @@ type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6300,25 +7117,59 @@ type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.CreateTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo: Query +// understanding information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo struct { + // QueryClassificationInfo: Query classification information. + QueryClassificationInfo []*GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo `json:"queryClassificationInfo,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. + // "QueryClassificationInfo") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // NullFields is a list of field names (e.g. "QueryClassificationInfo") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClass +// ificationInfo: Query classification information. +type GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo struct { + // Positive: Classification output. + Positive bool `json:"positive,omitempty"` + + // Type: Query classification type. + // + // Possible values: + // "TYPE_UNSPECIFIED" - Unspecified query classification type. + // "ADVERSARIAL_QUERY" - Adversarial query classification type. + // "NON_ANSWER_SEEKING_QUERY" - Non-answer-seeking query + // classification type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Positive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6326,7 +7177,7 @@ type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Positive") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6335,24 +7186,21 @@ type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryUnderstandingInfoQueryClassificationInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest: Request -// message for SiteSearchEngineService.CreateTargetSite method. -type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { - // Parent: Required. Parent resource name of TargetSite, such as - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine`. - Parent string `json:"parent,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerReference: Reference. +type GoogleCloudDiscoveryengineV1betaAnswerReference struct { + // ChunkInfo: Chunk information. + ChunkInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo `json:"chunkInfo,omitempty"` - // TargetSite: Required. The TargetSite to create. - TargetSite *GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSite,omitempty"` + // UnstructuredDocumentInfo: Unstructured document information. + UnstructuredDocumentInfo *GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo `json:"unstructuredDocumentInfo,omitempty"` - // ForceSendFields is a list of field names (e.g. "Parent") to + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6360,8 +7208,8 @@ type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Parent") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ChunkInfo") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6369,29 +7217,28 @@ type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest +func (s *GoogleCloudDiscoveryengineV1betaAnswerReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaCustomAttribute: A custom attribute -// that is not explicitly modeled in a resource, e.g. UserEvent. -type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { - // Numbers: The numerical values of this custom attribute. For example, - // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of - // CustomAttribute.text or CustomAttribute.numbers should be set. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Numbers []float64 `json:"numbers,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo: Chunk +// information. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // Text: The textual values of this custom attribute. For example, - // `["yellow", "green"]` when the key is "color". Empty string is not - // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly - // one of CustomAttribute.text or CustomAttribute.numbers should be set. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Text []string `json:"text,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "Numbers") to + // DocumentMetadata: Document metadata. + DocumentMetadata *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata `json:"documentMetadata,omitempty"` + + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6399,8 +7246,8 @@ type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Numbers") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6408,112 +7255,81 @@ type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfo var s1 struct { - Numbers []gensupport.JSONFloat64 `json:"numbers"` + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Numbers = make([]float64, len(s1.Numbers)) - for i := range s1.Numbers { - s.Numbers[i] = float64(s1.Numbers[i]) - } + s.RelevanceScore = float64(s1.RelevanceScore) return nil } -// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global -// settings and configs at the DataStore level. -type GoogleCloudDiscoveryengineV1betaDataStore struct { - // ContentConfig: Immutable. The content config of the data store. If - // this field is unset, the server behavior defaults to - // ContentConfig.NO_CONTENT. - // - // Possible values: - // "CONTENT_CONFIG_UNSPECIFIED" - Default value. - // "NO_CONTENT" - Only contains documents without any - // Document.content. - // "CONTENT_REQUIRED" - Only contains documents with Document.content. - // "PUBLIC_WEBSITE" - The data store is used for public website - // search. - ContentConfig string `json:"contentConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetada +// ta: Document metadata. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata struct { + // Document: Document resource name. + Document string `json:"document,omitempty"` - // CreateTime: Output only. Timestamp the DataStore was created at. - CreateTime string `json:"createTime,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // DefaultSchemaId: Output only. The id of the default Schema - // asscociated to this data store. - DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + // Title: Title. + Title string `json:"title,omitempty"` - // DisplayName: Required. The data store display name. This field must - // be a UTF-8 encoded string with a length limit of 128 characters. - // Otherwise, an INVALID_ARGUMENT error is returned. - DisplayName string `json:"displayName,omitempty"` + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` - // DocumentProcessingConfig: Configuration for Document understanding - // and enrichment. - DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // IndustryVertical: Immutable. The industry vertical that the data - // store registers. - // - // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` + // NullFields is a list of field names (e.g. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // Name: Immutable. The full resource name of the data store. Format: - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string - // with a length limit of 1024 characters. - Name string `json:"name,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceChunkInfoDocumentMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // SolutionTypes: The solutions that the data store enrolls. Available - // solutions for each industry_vertical: * `MEDIA`: - // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * - // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. - // Other solutions cannot be enrolled. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionTypes []string `json:"solutionTypes,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInf +// o: Unstructured document information. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo struct { + // ChunkContents: List of cited chunk contents derived from document + // content. + ChunkContents []*GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent `json:"chunkContents,omitempty"` - // StartingSchema: The start schema to use for this DataStore when - // provisioning it. If unset, a default vertical specialized schema will - // be used. This field is only used by CreateDataStore API, and will be - // ignored if used in other APIs. This field will be omitted from all - // API responses including CreateDataStore API. To retrieve a schema of - // a DataStore, use SchemaService.GetSchema API instead. The provided - // schema will be validated against certain rules on schema. Learn more - // from this doc - // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). - StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + // Document: Document resource name. + Document string `json:"document,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Title: Title. + Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentConfig") to + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkContents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6521,7 +7337,7 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentConfig") to include + // NullFields is a list of field names (e.g. "ChunkContents") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -6530,25 +7346,22 @@ type GoogleCloudDiscoveryengineV1betaDataStore struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDataStore +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata -// related to the progress of the DataStoreService.DeleteDataStore -// operation. This will be returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInf +// oChunkContent: Chunk content. +type GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6556,7 +7369,7 @@ type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Content") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6565,25 +7378,33 @@ type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerReferenceUnstructuredDocumentInfoChunkContent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata -// related to the progress of the EngineService.DeleteEngine operation. -// This will be returned by the google.longrunning.Operation.metadata -// field. -type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStep: Step information. +type GoogleCloudDiscoveryengineV1betaAnswerStep struct { + // Actions: Actions. + Actions []*GoogleCloudDiscoveryengineV1betaAnswerStepAction `json:"actions,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Description: The description of the step. + Description string `json:"description,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // State: The state of the step. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unknown. + // "IN_PROGRESS" - Step is currently in progress. + // "FAILED" - Step currently failed. + // "SUCCEEDED" - Step has succeeded. + State string `json:"state,omitempty"` + + // Thought: The thought of the step. + Thought string `json:"thought,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Actions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6591,7 +7412,7 @@ type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Actions") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6600,23 +7421,21 @@ type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerStep) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStep raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for -// DeleteSchema LRO. -type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStepAction: Action. +type GoogleCloudDiscoveryengineV1betaAnswerStepAction struct { + // Observation: Observation. + Observation *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation `json:"observation,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // SearchAction: Search action. + SearchAction *GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction `json:"searchAction,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Observation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6624,34 +7443,71 @@ type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Observation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.DeleteTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation: +// Observation. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation struct { + // SearchResults: Search results observed by the search action, it can + // be snippets info or chunk info, depending on the citation type set by + // the user. + SearchResults []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult `json:"searchResults,omitempty"` - // 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. "SearchResults") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // NullFields is a list of field names (e.g. "SearchResults") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult struct { + // ChunkInfo: If citation_type is CHUNK_LEVEL_CITATION and chunk mode is + // on, populate chunk info. + ChunkInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo `json:"chunkInfo,omitempty"` + + // Document: Document resource name. + Document string `json:"document,omitempty"` + + // SnippetInfo: If citation_type is DOCUMENT_LEVEL_CITATION, populate + // document level snippets. + SnippetInfo []*GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo `json:"snippetInfo,omitempty"` + + // Title: Title. + Title string `json:"title,omitempty"` + + // Uri: URI for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkInfo") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6659,7 +7515,7 @@ type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ChunkInfo") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6668,25 +7524,25 @@ type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This -// will be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResul +// tChunkInfo: Chunk information. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo struct { + // Chunk: Chunk resource name. + Chunk string `json:"chunk,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Content: Chunk textual content. + Content string `json:"content,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // RelevanceScore: Relevance score. + RelevanceScore float64 `json:"relevanceScore,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Chunk") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6694,8 +7550,8 @@ type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Chunk") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6703,78 +7559,36 @@ type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest: -// Request message for SiteSearchEngineService.DisableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest struct { +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultChunkInfo + var s1 struct { + RelevanceScore gensupport.JSONFloat64 `json:"relevanceScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.RelevanceScore = float64(s1.RelevanceScore) + return nil } -// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: -// Response message for -// SiteSearchEngineService.DisableAdvancedSiteSearch method. -type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { -} +// GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResul +// tSnippetInfo: Snippet information. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo struct { + // Snippet: Snippet content. + Snippet string `json:"snippet,omitempty"` -// GoogleCloudDiscoveryengineV1betaDocument: Document captures all raw -// metadata information of items to be recommended or searched. -type GoogleCloudDiscoveryengineV1betaDocument struct { - // Content: The unstructured data linked to this document. Content must - // be set if this document is under a `CONTENT_REQUIRED` data store. - Content *GoogleCloudDiscoveryengineV1betaDocumentContent `json:"content,omitempty"` + // SnippetStatus: Status of the snippet defined by the search team. + SnippetStatus string `json:"snippetStatus,omitempty"` - // DerivedStructData: Output only. This field is OUTPUT_ONLY. It - // contains derived data that are not in the original input document. - DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` - - // Id: Immutable. The identifier of the document. Id should conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length - // limit of 63 characters. - Id string `json:"id,omitempty"` - - // IndexTime: Output only. The last time the document was indexed. If - // this field is set, the document could be returned in search results. - // This field is OUTPUT_ONLY. If this field is not populated, it means - // the document has never been indexed. - IndexTime string `json:"indexTime,omitempty"` - - // JsonData: The JSON string representation of the document. It should - // conform to the registered Schema or an `INVALID_ARGUMENT` error is - // thrown. - JsonData string `json:"jsonData,omitempty"` - - // Name: Immutable. The full resource name of the document. Format: - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/branches/{branch}/documents/{document_id}`. This - // field must be a UTF-8 encoded string with a length limit of 1024 - // characters. - Name string `json:"name,omitempty"` - - // ParentDocumentId: The identifier of the parent document. Currently - // supports at most two level document hierarchy. Id should conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length - // limit of 63 characters. - ParentDocumentId string `json:"parentDocumentId,omitempty"` - - // SchemaId: The identifier of the schema located in the same data - // store. - SchemaId string `json:"schemaId,omitempty"` - - // StructData: The structured JSON data for the document. It should - // conform to the registered Schema or an `INVALID_ARGUMENT` error is - // thrown. - StructData googleapi.RawMessage `json:"structData,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "Snippet") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6782,7 +7596,7 @@ type GoogleCloudDiscoveryengineV1betaDocument struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "Snippet") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -6791,40 +7605,19 @@ type GoogleCloudDiscoveryengineV1betaDocument struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocument +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionObservationSearchResultSnippetInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentContent: Unstructured data -// linked to this document. -type GoogleCloudDiscoveryengineV1betaDocumentContent struct { - // MimeType: The MIME type of the content. Supported types: * - // `application/pdf` (PDF, only native PDFs are supported for now) * - // `text/html` (HTML) * - // `application/vnd.openxmlformats-officedocument.wordprocessingml.docume - // nt` (DOCX) * - // `application/vnd.openxmlformats-officedocument.presentationml.presenta - // tion` (PPTX) * `text/plain` (TXT) See - // https://www.iana.org/assignments/media-types/media-types.xhtml. - MimeType string `json:"mimeType,omitempty"` - - // RawBytes: The content represented as a stream of bytes. The maximum - // length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all - // `bytes` fields, this field is represented as pure binary in Protocol - // Buffers and base64-encoded string in JSON. For example, - // `abc123!?$*&()'-=@~` should be represented as - // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See - // https://developers.google.com/protocol-buffers/docs/proto3#json. - RawBytes string `json:"rawBytes,omitempty"` - - // Uri: The URI of the content. Only Cloud Storage URIs (e.g. - // `gs://bucket-name/path/to/file`) are supported. The maximum file size - // is 2.5 MB for text-based formats, 100 MB for other formats. - Uri string `json:"uri,omitempty"` +// GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction: Search +// action. +type GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction struct { + // Query: The query to search. + Query string `json:"query,omitempty"` - // ForceSendFields is a list of field names (e.g. "MimeType") to + // ForceSendFields is a list of field names (e.g. "Query") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6832,8 +7625,8 @@ type GoogleCloudDiscoveryengineV1betaDocumentContent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MimeType") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6841,38 +7634,25 @@ type GoogleCloudDiscoveryengineV1betaDocumentContent struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentContent +func (s *GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerStepActionSearchAction raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document -// information associated with a user event. -type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { - // Id: The Document resource ID. - Id string `json:"id,omitempty"` - - // Name: The Document resource full name, of the form: - // `projects/{project_id}/locations/{location}/collections/{collection_id - // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ - // id}` - Name string `json:"name,omitempty"` - - // PromotionIds: The promotion IDs associated with this Document. - // Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` - - // Quantity: Quantity of the Document associated with the user event. - // Defaults to 1. For example, this field will be 2 if two quantities of - // the same Document are involved in a `add-to-cart` event. Required for - // events of the following event types: * `add-to-cart` * `purchase` - Quantity int64 `json:"quantity,omitempty"` +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.BatchCreateTargetSites operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Uri: The Document URI - only allowed for website data stores. - Uri string `json:"uri,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. "Id") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -6880,8 +7660,8 @@ type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API - // requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -6889,151 +7669,116 @@ type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo +func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton -// resource of DataStore. It's empty when DataStore is created, which -// defaults to digital parser. The first call to -// DataStoreService.UpdateDocumentProcessingConfig method will -// initialize the config. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { - // DefaultParsingConfig: Configurations for default Document parser. If - // not specified, we will configure it as default DigitalParsingConfig, - // and the default parsing config will be applied to all file types for - // Document parsing. - DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - - // Name: The full resource name of the Document Processing Config. - // Format: - // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC - // onfig`. - Name string `json:"name,omitempty"` - - // ParsingConfigOverrides: Map from file type to override the default - // parsing configuration based on the file type. Supported keys: * - // `pdf`: Override parsing config for PDF files, either digital parsing, - // ocr parsing or layout parsing is supported. * `html`: Override - // parsing config for HTML files, only digital parsing and or layout - // parsing are supported. * `docx`: Override parsing config for DOCX - // files, only digital parsing and or layout parsing are supported. - ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest: +// Request message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest struct { + // Requests: Required. The request message specifying the resources to + // create. A maximum of 20 TargetSites can be created in a batch. + Requests []*GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest `json:"requests,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DefaultParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "Requests") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultParsingConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Requests") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig +func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: -// -// Related configurations applied to a specific type of document -// -// parser. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { - // DigitalParsingConfig: Configurations applied to digital parser. - DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - - // OcrParsingConfig: Configurations applied to OCR parser. Currently it - // only applies to PDFs. - OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse: +// Response message for SiteSearchEngineService.BatchCreateTargetSites +// method. +type GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse struct { + // TargetSites: TargetSites created. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "DigitalParsingConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "TargetSites") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DigitalParsingConfig") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "TargetSites") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig +func (s *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigD -// igitalParsingConfig: The digital parsing configurations for -// documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +// GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest: +// Request message for SiteSearchEngineService.BatchVerifyTargetSites +// method. +type GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest struct { } -// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigO -// crParsingConfig: The OCR parsing configurations for documents. -type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { - // EnhancedDocumentElements: Apply additional enhanced OCR processing to - // a list of document elements. Supported values: * `table`: advanced - // table parsing model. - EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` +// GoogleCloudDiscoveryengineV1betaBigQuerySource: BigQuery source +// import data from. +type GoogleCloudDiscoveryengineV1betaBigQuerySource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for user event imports: * `user_event` (default): + // One UserEvent per row. Supported values for document imports: * + // `document` (default): One Document format per row. Each document must + // have a valid Document.id and one of Document.json_data or + // Document.struct_data. * `custom`: One custom data per row in + // arbitrary format that conforms to the defined Schema of the data + // store. This can only be used by the GENERIC Data Store vertical. + DataSchema string `json:"dataSchema,omitempty"` - // UseNativeText: If true, will use native text instead of OCR text on - // pages containing native text. - UseNativeText bool `json:"useNativeText,omitempty"` + // DatasetId: Required. The BigQuery data set to copy the data from with + // a length limit of 1,024 characters. + DatasetId string `json:"datasetId,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnhancedDocumentElements") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the BigQuery export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // NullFields is a list of field names (e.g. "EnhancedDocumentElements") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. - NullFields []string `json:"-"` -} + // PartitionDate: BigQuery time partitioned table's _PARTITIONDATE in + // YYYY-MM-DD format. + PartitionDate *GoogleTypeDate `json:"partitionDate,omitempty"` -func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} + // ProjectId: The project ID (can be project # or ID) that the BigQuery + // source is in with a length limit of 128 characters. If not specified, + // inherits the project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` -// GoogleCloudDiscoveryengineV1betaDoubleList: Double list. -type GoogleCloudDiscoveryengineV1betaDoubleList struct { - // Values: Double values. - Values []float64 `json:"values,omitempty"` + // TableId: Required. The BigQuery table to copy the data from with a + // length limit of 1,024 characters. + TableId string `json:"tableId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Values") to + // ForceSendFields is a list of field names (e.g. "DataSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7041,8 +7786,8 @@ type GoogleCloudDiscoveryengineV1betaDoubleList struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "DataSchema") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7050,36 +7795,25 @@ type GoogleCloudDiscoveryengineV1betaDoubleList struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaDoubleList) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList +func (s *GoogleCloudDiscoveryengineV1betaBigQuerySource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigQuerySource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaDoubleList) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList - var s1 struct { - Values []gensupport.JSONFloat64 `json:"values"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Values = make([]float64, len(s1.Values)) - for i := range s1.Values { - s.Values[i] = float64(s1.Values[i]) - } - return nil -} +// GoogleCloudDiscoveryengineV1betaBigtableOptions: The Bigtable Options +// object that contains information to support the import. +type GoogleCloudDiscoveryengineV1betaBigtableOptions struct { + // Families: The mapping from family names to an object that contains + // column families level information for the given column family. If a + // family is not present in this map it will be ignored. + Families map[string]GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily `json:"families,omitempty"` -// GoogleCloudDiscoveryengineV1betaEmbeddingConfig: Defines embedding -// config, used for bring your own embeddings feature. -type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { - // FieldPath: Full field path in the schema mapped as embedding field. - FieldPath string `json:"fieldPath,omitempty"` + // KeyFieldName: The field name used for saving row key value in the + // document. The name has to match the pattern `a-zA-Z0-9*`. + KeyFieldName string `json:"keyFieldName,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // ForceSendFields is a list of field names (e.g. "Families") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7087,7 +7821,7 @@ type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in + // NullFields is a list of field names (e.g. "Families") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7096,25 +7830,55 @@ type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEmbeddingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEmbeddingConfig +func (s *GoogleCloudDiscoveryengineV1betaBigtableOptions) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptions raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: -// Metadata related to the progress of the -// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will -// be returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn: The +// column of the Bigtable. +type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn struct { + // Encoding: The encoding mode of the values when the type is not + // `STRING`. Acceptable encoding values are: * `TEXT`: indicates values + // are alphanumeric text strings. * `BINARY`: indicates values are + // encoded using `HBase Bytes.toBytes` family of functions. This can be + // overridden for a specific column by listing that column in `columns` + // and specifying an encoding for it. + // + // Possible values: + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // FieldName: The field name to use for this column in the document. The + // name has to match the pattern `a-zA-Z0-9*`. If not set, it is parsed + // from the qualifier bytes with best effort. However, due to different + // naming patterns, field name collisions could happen, where parsing + // behavior is undefined. + FieldName string `json:"fieldName,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // Qualifier: Required. Qualifier of the column. If it cannot be decoded + // with utf-8, use a base-64 encoded string instead. + Qualifier string `json:"qualifier,omitempty"` + + // Type: The type of values in this column family. The values are + // expected to be encoded using `HBase Bytes.toBytes` function when the + // encoding value is set to `BINARY`. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Encoding") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7122,7 +7886,7 @@ type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "Encoding") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7131,105 +7895,100 @@ type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata +func (s *GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest: -// Request message for SiteSearchEngineService.EnableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: -// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch -// method. -type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { -} - -// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the -// training and serving parameters of an Engine. -type GoogleCloudDiscoveryengineV1betaEngine struct { - // ChatEngineConfig: Configurations for the Chat Engine. Only applicable - // if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` - - // ChatEngineMetadata: Output only. Additional information of the Chat - // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. - ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` - - // CommonConfig: Common config spec that specifies the metadata of the - // engine. - CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` - - // CreateTime: Output only. Timestamp the Recommendation Engine was - // created at. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily: +// The column family of the Bigtable. +type GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily struct { + // Columns: The list of objects that contains column level information + // for each column. If a column is not present in this list it will be + // ignored. + Columns []*GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumn `json:"columns,omitempty"` - // DataStoreIds: The data stores associated with this engine. For - // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of - // engines, they can only associate with at most one data store. If - // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same - // Collection can be associated here. Note that when used in - // CreateEngineRequest, one DataStore id must be provided as the system - // will use it for necessary initializations. - DataStoreIds []string `json:"dataStoreIds,omitempty"` + // Encoding: The encoding mode of the values when the type is not + // STRING. Acceptable encoding values are: * `TEXT`: indicates values + // are alphanumeric text strings. * `BINARY`: indicates values are + // encoded using `HBase Bytes.toBytes` family of functions. This can be + // overridden for a specific column by listing that column in `columns` + // and specifying an encoding for it. + // + // Possible values: + // "ENCODING_UNSPECIFIED" - The encoding is unspecified. + // "TEXT" - Text encoding. + // "BINARY" - Binary encoding. + Encoding string `json:"encoding,omitempty"` - // DisplayName: Required. The display name of the engine. Should be - // human readable. UTF-8 encoded string with limit of 1024 characters. - DisplayName string `json:"displayName,omitempty"` + // FieldName: The field name to use for this column family in the + // document. The name has to match the pattern `a-zA-Z0-9*`. If not set, + // it is parsed from the family name with best effort. However, due to + // different naming patterns, field name collisions could happen, where + // parsing behavior is undefined. + FieldName string `json:"fieldName,omitempty"` - // IndustryVertical: The industry vertical that the engine registers. - // The restriction of the Engine industry vertical is based on - // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine - // has to match vertical of the DataStore liniked to the engine. + // Type: The type of values in this column family. The values are + // expected to be encoded using `HBase Bytes.toBytes` function when the + // encoding value is set to `BINARY`. // // Possible values: - // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. - // "GENERIC" - The generic vertical for documents that are not - // specific to any industry vertical. - // "MEDIA" - The media industry vertical. - // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. - IndustryVertical string `json:"industryVertical,omitempty"` + // "TYPE_UNSPECIFIED" - The type is unspecified. + // "STRING" - String type. + // "NUMBER" - Numerical type. + // "INTEGER" - Integer type. + // "VAR_INTEGER" - Variable length integer type. + // "BIG_NUMERIC" - BigDecimal type. + // "BOOLEAN" - Boolean type. + // "JSON" - JSON type. + Type string `json:"type,omitempty"` - // 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/{collectio - // n}/engines/{engine}` engine should be 1-63 characters, and valid - // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is - // returned. - Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Columns") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // SearchEngineConfig: Configurations for the Search Engine. Only - // applicable if solution_type is SOLUTION_TYPE_SEARCH. - SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + // NullFields is a list of field names (e.g. "Columns") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // SolutionType: Required. The solutions of the engine. - // - // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionType string `json:"solutionType,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableOptionsBigtableColumnFamily + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // UpdateTime: Output only. Timestamp the Recommendation Engine was last - // updated. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaBigtableSource: The Cloud Bigtable +// source for importing data. +type GoogleCloudDiscoveryengineV1betaBigtableSource struct { + // BigtableOptions: Required. Bigtable options that contains information + // needed when parsing data into typed structures. For example, column + // type annotations. + BigtableOptions *GoogleCloudDiscoveryengineV1betaBigtableOptions `json:"bigtableOptions,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // InstanceId: Required. The instance ID of the Cloud Bigtable that + // needs to be imported. + InstanceId string `json:"instanceId,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // ProjectId: The project ID that the Bigtable source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The table ID of the Cloud Bigtable that needs to + // be imported. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigtableOptions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7237,7 +7996,7 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChatEngineConfig") to + // NullFields is a list of field names (e.g. "BigtableOptions") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7247,43 +8006,34 @@ type GoogleCloudDiscoveryengineV1betaEngine struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngine +func (s *GoogleCloudDiscoveryengineV1betaBigtableSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaBigtableSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: -// Configurations for a Chat Engine. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { - // AgentCreationConfig: The configurationt generate the Dialogflow agent - // that is associated to this Engine. Note that these configurations are - // one-time consumed by and passed to Dialogflow service. It means they - // cannot be retrieved using EngineService.GetEngine or - // EngineService.ListEngines API after engine creation. - AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaCheckGroundingRequest: Request +// message for GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1betaCheckGroundingRequest struct { + // AnswerCandidate: Answer candidate to check. + AnswerCandidate string `json:"answerCandidate,omitempty"` - // DialogflowAgentToLink: The resource name of an exist Dialogflow agent - // to link to this Chat Engine. Customers can either provide - // `agent_creation_config` to create agent or provide an agent name that - // links the agent with the Chat engine. Format: - // `projects//locations//agents/`. Note that the - // `dialogflow_agent_to_link` are one-time consumed by and passed to - // Dialogflow service. It means they cannot be retrieved using - // EngineService.GetEngine or EngineService.ListEngines API after engine - // creation. Please use ChatEngineMetadata.dialogflow_agent for actual - // agent association after Engine is created. - DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` + // Facts: List of facts for the grounding check. We support up to 200 + // facts. + Facts []*GoogleCloudDiscoveryengineV1betaGroundingFact `json:"facts,omitempty"` - // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") - // to unconditionally include in API requests. By default, fields with + // GroundingSpec: Configuration of the grounding check. + GroundingSpec *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec `json:"groundingSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AnswerCandidate") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AgentCreationConfig") to + // NullFields is a list of field names (e.g. "AnswerCandidate") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7293,42 +8043,34 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationCon -// fig: Configurations for generating a Dialogflow agent. Note that -// these configurations are one-time consumed by and passed to -// Dialogflow service. It means they cannot be retrieved using -// EngineService.GetEngine or EngineService.ListEngines API after engine -// creation. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { - // Business: Name of the company, organization or other entity that the - // agent represents. Used for knowledge connector LLM prompt and for - // knowledge search. - Business string `json:"business,omitempty"` +// GoogleCloudDiscoveryengineV1betaCheckGroundingResponse: Response +// message for the GroundedGenerationService.CheckGrounding method. +type GoogleCloudDiscoveryengineV1betaCheckGroundingResponse struct { + // CitedChunks: List of facts cited across all claims in the answer + // candidate. These are derived from the facts supplied in the request. + CitedChunks []*GoogleCloudDiscoveryengineV1betaFactChunk `json:"citedChunks,omitempty"` - // DefaultLanguageCode: Required. The default language of the agent as a - // language tag. See Language Support - // (https://cloud.google.com/dialogflow/docs/reference/language) for a - // list of the currently supported language codes. - DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` + // Claims: Claim texts and citation info across all claims in the answer + // candidate. + Claims []*GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim `json:"claims,omitempty"` - // Location: Agent location for Agent creation, supported values: - // global/us/eu. If not provided, us Engine will create Agent using - // us-central-1 by default; eu Engine will create Agent using eu-west-1 - // by default. - Location string `json:"location,omitempty"` + // SupportScore: The support score for the input answer candidate. + // Higher the score, higher is the fraction of claims that are supported + // by the provided facts. This is always set when a response is + // returned. + SupportScore float64 `json:"supportScore,omitempty"` - // TimeZone: Required. The time zone of the agent from the time zone - // database (https://www.iana.org/time-zones), e.g., America/New_York, - // Europe/Paris. - TimeZone string `json:"timeZone,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Business") to + // ForceSendFields is a list of field names (e.g. "CitedChunks") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7336,29 +8078,58 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Business") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CitedChunks") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional -// information of a Chat Engine. Fields in this message are output only. -type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { - // DialogflowAgent: The resource name of a Dialogflow agent, that this - // Chat Engine refers to. Format: `projects//locations//agents/`. - DialogflowAgent string `json:"dialogflowAgent,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponse + var s1 struct { + SupportScore gensupport.JSONFloat64 `json:"supportScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.SupportScore = float64(s1.SupportScore) + return nil +} - // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to +// GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim: Text and +// citation info for a claim in the answer candidate. +type GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim struct { + // CitationIndices: A list of indices (into 'cited_chunks') specifying + // the citations associated with the claim. For instance [1,3,4] means + // that cited_chunks[1], cited_chunks[3], cited_chunks[4] are the facts + // cited supporting for the claim. A citation to a fact indicates that + // the claim is supported by the fact. + CitationIndices []int64 `json:"citationIndices,omitempty"` + + // ClaimText: Text for the claim in the answer candidate. Always + // provided regardless of whether citations or anti-citations are found. + ClaimText string `json:"claimText,omitempty"` + + // EndPos: Position indicating the end of the claim in the answer + // candidate, exclusive. + EndPos int64 `json:"endPos,omitempty"` + + // StartPos: Position indicating the start of the claim in the answer + // candidate, measured in bytes/unicode. + StartPos int64 `json:"startPos,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CitationIndices") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7366,7 +8137,7 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DialogflowAgent") to + // NullFields is a list of field names (e.g. "CitationIndices") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -7376,67 +8147,95 @@ type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingResponseClaim raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// 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 string `json:"companyName,omitempty"` +// GoogleCloudDiscoveryengineV1betaCheckGroundingSpec: Specification for +// the grounding check. +type GoogleCloudDiscoveryengineV1betaCheckGroundingSpec struct { + // CitationThreshold: The threshold (in [0,1]) used for determining + // whether a fact must be cited for a claim in the answer candidate. + // Choosing a higher threshold will lead to fewer but very strong + // citations, while choosing a lower threshold may lead to more but + // somewhat weaker citations. If unset, the threshold will default to + // 0.6. + CitationThreshold float64 `json:"citationThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "CompanyName") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "CitationThreshold") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CompanyName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CitationThreshold") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: -// Configurations for a Search Engine. -type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { - // SearchAddOns: The add-on that this search engine enables. - // - // Possible values: - // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_ADD_ON_LLM" - Large language model add-on. - SearchAddOns []string `json:"searchAddOns,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaCheckGroundingSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCheckGroundingSpec + var s1 struct { + CitationThreshold gensupport.JSONFloat64 `json:"citationThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.CitationThreshold = float64(s1.CitationThreshold) + return nil +} - // SearchTier: The search feature tier of this engine. Different tiers - // might have different pricing. To learn more, please check the pricing - // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not - // specified. - // - // Possible values: - // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is - // unspecified. This is invalid to use. - // "SEARCH_TIER_STANDARD" - Standard tier. - // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. - SearchTier string `json:"searchTier,omitempty"` +// GoogleCloudDiscoveryengineV1betaCloudSqlSource: Cloud SQL source +// import data from. +type GoogleCloudDiscoveryengineV1betaCloudSqlSource struct { + // DatabaseId: Required. The Cloud SQL database to copy the data from + // with a length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` - // ForceSendFields is a list of field names (e.g. "SearchAddOns") to + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the Cloud SQL export to a specific Cloud Storage + // directory. Please ensure that the Cloud SQL service account has the + // necessary Cloud Storage Admin permissions to access the specified + // Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` + + // InstanceId: Required. The Cloud SQL instance to copy the data from + // with a length limit of 256 characters. + InstanceId string `json:"instanceId,omitempty"` + + // Offload: Option for serverless export. Enabling this option will + // incur additional cost. More info can be found here + // (https://cloud.google.com/sql/pricing#serverless). + Offload bool `json:"offload,omitempty"` + + // ProjectId: The project ID that the Cloud SQL source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The Cloud SQL table to copy the data from with a + // length limit of 256 characters. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7444,45 +8243,39 @@ type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SearchAddOns") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DatabaseId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig +func (s *GoogleCloudDiscoveryengineV1betaCloudSqlSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCloudSqlSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse: -// -// Response message for -// -// SiteSearchEngineService.FetchDomainVerificationStatus method. -type GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TargetSites: List of TargetSites containing the site verification - // status. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` +// GoogleCloudDiscoveryengineV1betaCompleteQueryResponse: Response +// message for CompletionService.CompleteQuery method. +type GoogleCloudDiscoveryengineV1betaCompleteQueryResponse struct { + // QuerySuggestions: Results of the matched query suggestions. The + // result list is ordered and the first result is a top suggestion. + QuerySuggestions []*GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion `json:"querySuggestions,omitempty"` - // TotalSize: The total number of items matching the request. This will - // always be populated in the response. - TotalSize int64 `json:"totalSize,omitempty"` + // TailMatchTriggered: True if the returned suggestions are all tail + // suggestions. For tail matching to be triggered, + // include_tail_suggestions in the request must be true and there must + // be no suggestions that match the full query. + TailMatchTriggered bool `json:"tailMatchTriggered,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "QuerySuggestions") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7490,84 +8283,73 @@ type GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse struc // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "QuerySuggestions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +func (s *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFhirStoreSource: Cloud FhirStore -// source import data from. -type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { - // FhirStore: Required. The full resource name of the FHIR store to - // import data from, in the format of - // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores - // /{fhir_store}`. - FhirStore string `json:"fhirStore,omitempty"` +// GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion: +// Suggestions as search queries. +type GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion struct { + // CompletableFieldPaths: The unique document field paths that serve as + // the source of this suggestion if it was generated from completable + // fields. This field is only populated for the document-completable + // model. + CompletableFieldPaths []string `json:"completableFieldPaths,omitempty"` - // GcsStagingDir: Intermediate Cloud Storage directory used for the - // import with a length limit of 2,000 characters. Can be specified if - // one wants to have the FhirStore export to a specific Cloud Storage - // directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` + // Suggestion: The suggestion for the query. + Suggestion string `json:"suggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "FhirStore") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "CompletableFieldPaths") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FhirStore") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CompletableFieldPaths") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaFhirStoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFhirStoreSource +func (s *GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompleteQueryResponseQuerySuggestion raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaFirestoreSource: Firestore source -// import data from. -type GoogleCloudDiscoveryengineV1betaFirestoreSource struct { - // CollectionId: Required. The Firestore collection to copy the data - // from with a length limit of 1500 characters. - CollectionId string `json:"collectionId,omitempty"` - - // DatabaseId: Required. The Firestore database to copy the data from - // with a length limit of 256 characters. - DatabaseId string `json:"databaseId,omitempty"` - - // GcsStagingDir: Optional. Intermediate Cloud Storage directory used - // for the import with a length limit of 2,000 characters. Can be - // specified if one wants to have the Firestore export to a specific - // Cloud Storage directory. Please ensure that the Firestore service - // account has the necessary GCS Storage Admin permissions to access the - // specified GCS directory. - GcsStagingDir string `json:"gcsStagingDir,omitempty"` +// GoogleCloudDiscoveryengineV1betaCompletionInfo: Detailed completion +// information including completion attribution token and clicked +// completion info. +type GoogleCloudDiscoveryengineV1betaCompletionInfo struct { + // SelectedPosition: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion position, starting + // from 0. + SelectedPosition int64 `json:"selectedPosition,omitempty"` - // ProjectId: Optional. The project ID (can be project # or ID) that the - // Cloud SQL source is in with a length limit of 128 characters. If not - // specified, inherits the project ID from the parent request. - ProjectId string `json:"projectId,omitempty"` + // SelectedSuggestion: End user selected + // CompleteQueryResponse.QuerySuggestion.suggestion. + SelectedSuggestion string `json:"selectedSuggestion,omitempty"` - // ForceSendFields is a list of field names (e.g. "CollectionId") to + // ForceSendFields is a list of field names (e.g. "SelectedPosition") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7575,48 +8357,57 @@ type GoogleCloudDiscoveryengineV1betaFirestoreSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CollectionId") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "SelectedPosition") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaFirestoreSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaFirestoreSource +func (s *GoogleCloudDiscoveryengineV1betaCompletionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCompletionInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaGcsSource: Cloud Storage location for -// input content. -type GoogleCloudDiscoveryengineV1betaGcsSource struct { - // DataSchema: The schema to use when parsing the data from the source. - // Supported values for document imports: * `document` (default): One - // JSON Document per line. Each document must have a valid Document.id. - // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by - // `input_uris` becomes a document, with the ID set to the first 128 - // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom - // data JSON per row in arbitrary format that conforms to the defined - // Schema of the data store. This can only be used by Gen App Builder. * - // `csv`: A CSV file with header conforming to the defined Schema of the - // data store. Each entry after the header is imported as a Document. - // This can only be used by Gen App Builder. Supported values for user - // even imports: * `user_event` (default): One JSON UserEvent per line. - DataSchema string `json:"dataSchema,omitempty"` +// GoogleCloudDiscoveryengineV1betaConversation: External conversation +// proto definition. +type GoogleCloudDiscoveryengineV1betaConversation struct { + // EndTime: Output only. The time the conversation finished. + EndTime string `json:"endTime,omitempty"` - // InputUris: Required. Cloud Storage URIs to input files. URI can be up - // to 2000 characters long. URIs can match the full object path (for - // example, `gs://bucket/directory/object.json`) or a pattern matching - // one or more files, such as `gs://bucket/directory/*.json`. A request - // can contain at most 100 files (or 100,000 files if `data_schema` is - // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` - // is `content`). - InputUris []string `json:"inputUris,omitempty"` + // Messages: Conversation messages. + Messages []*GoogleCloudDiscoveryengineV1betaConversationMessage `json:"messages,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataSchema") to + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/dataStore/*/conve + // rsations/*` or + // `project/*/locations/global/collections/{collection}/engines/*/convers + // ations/*`. + 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7624,7 +8415,7 @@ type GoogleCloudDiscoveryengineV1betaGcsSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataSchema") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7633,20 +8424,24 @@ type GoogleCloudDiscoveryengineV1betaGcsSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaGcsSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaGcsSource +func (s *GoogleCloudDiscoveryengineV1betaConversation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversation raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaGroundingConfig: Grounding -// configuration. -type GoogleCloudDiscoveryengineV1betaGroundingConfig struct { - // Name: Required. Name of the GroundingConfig, of the form - // `projects/{project}/locations/{location}/groundingConfig`. - Name string `json:"name,omitempty"` +// 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"` - // ForceSendFields is a list of field names (e.g. "Name") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7654,38 +8449,33 @@ type GoogleCloudDiscoveryengineV1betaGroundingConfig struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "ActiveDocument") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaGroundingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaGroundingConfig +func (s *GoogleCloudDiscoveryengineV1betaConversationContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationContext raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata -// related to the progress of the ImportDocuments operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { - // CreateTime: Operation create time. +// GoogleCloudDiscoveryengineV1betaConversationMessage: Defines a +// conversation message. +type GoogleCloudDiscoveryengineV1betaConversationMessage struct { + // CreateTime: Output only. Message creation timestamp. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` + // Reply: Search reply. + Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,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 @@ -7704,90 +8494,118 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1betaConversationMessage) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConversationMessage raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsRequest: Request -// message for Import methods. -type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { - // AutoGenerateIds: Whether to automatically generate IDs for the - // documents if absent. If set to `true`, Document.ids are automatically - // generated based on the hash of the payload, where IDs may not be - // consistent during multiple imports. In which case - // ReconciliationMode.FULL is highly recommended to avoid duplicate - // contents. If unset or set to `false`, Document.ids have to be - // specified using id_field, otherwise, documents without IDs fail to be - // imported. Supported data sources: * GcsSource. GcsSource.data_schema - // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is - // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` - // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * - // SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource - AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` +// 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"` - // BigtableSource: Cloud Bigtable input source. - BigtableSource *GoogleCloudDiscoveryengineV1betaBigtableSource `json:"bigtableSource,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"` - // CloudSqlSource: Cloud SQL input source. - CloudSqlSource *GoogleCloudDiscoveryengineV1betaCloudSqlSource `json:"cloudSqlSource,omitempty"` + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. This will be + // used to filter search results which may affect the summary response. + // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned. + // Filtering in Vertex AI Search is done by mapping the LHS filter key + // to a key property defined in the Vertex AI Search backend -- this + // mapping is defined by the customer in their schema. For example a + // media customer might have a field 'name' in their schema. In this + // case the filter would look like this: filter --> name:'ANY("king + // kong")' For more information about filtering including syntax and + // filter operators, see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` - // ErrorConfig: The desired location of errors incurred during the - // Import. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + // Query: Required. Current user input. + Query *GoogleCloudDiscoveryengineV1betaTextInput `json:"query,omitempty"` - // FhirStoreSource: FhirStore input source. - FhirStoreSource *GoogleCloudDiscoveryengineV1betaFhirStoreSource `json:"fhirStoreSource,omitempty"` + // SafeSearch: Whether to turn on safe search. + SafeSearch bool `json:"safeSearch,omitempty"` - // FirestoreSource: Firestore input source. - FirestoreSource *GoogleCloudDiscoveryengineV1betaFirestoreSource `json:"firestoreSource,omitempty"` + // ServingConfig: The resource name of the Serving Config to use. + // Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion}/dataStores/{data_store_id}/servingConfigs/{serving_config_id}` + // If this is not set, the default serving config will be used. + ServingConfig string `json:"servingConfig,omitempty"` - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + // SummarySpec: A specification for configuring the summary returned in + // the response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` - // IdField: The field indicates the ID field or column to be used as - // unique IDs of the documents. For GcsSource it is the key of the JSON - // field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For - // others, it may be the column name of the table where the unique ids - // are stored. The values of the JSON field or the table column are used - // as the Document.ids. The JSON field or the table column must be of - // string type, and the values must be set as valid strings conform to - // RFC-1034 (https://tools.ietf.org/html/rfc1034) with 1-63 characters. - // Otherwise, documents without valid IDs fail to be imported. Only set - // this field when auto_generate_ids is unset or set as `false`. - // Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a - // default value `_id` is used when importing from the allowed data - // sources. Supported data sources: * GcsSource. GcsSource.data_schema - // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is - // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` - // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * - // SpannerSource * CloudSqlSource * FirestoreSource * BigtableSource - IdField string `json:"idField,omitempty"` + // 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"` - // InlineSource: The Inline source for the input content for documents. - InlineSource *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostSpec") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ReconciliationMode: The mode of reconciliation between existing - // documents and the documents to be imported. Defaults to - // ReconciliationMode.INCREMENTAL. - // - // Possible values: - // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. - // "INCREMENTAL" - Inserts new documents or updates existing - // documents. - // "FULL" - Calculates diff and replaces the entire document dataset. - // Existing documents may be deleted if they are not present in the - // source location. - ReconciliationMode string `json:"reconciliationMode,omitempty"` + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // SpannerSource: Spanner input source. - SpannerSource *GoogleCloudDiscoveryengineV1betaSpannerSource `json:"spannerSource,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ForceSendFields is a list of field names (e.g. "AutoGenerateIds") to +// GoogleCloudDiscoveryengineV1betaConverseConversationResponse: +// Response message for ConversationalSearchService.ConverseConversation +// method. +type GoogleCloudDiscoveryengineV1betaConverseConversationResponse struct { + // Conversation: Updated conversation including the answer. + Conversation *GoogleCloudDiscoveryengineV1betaConversation `json:"conversation,omitempty"` + + // RelatedQuestions: Suggested related questions. + RelatedQuestions []string `json:"relatedQuestions,omitempty"` + + // Reply: Answer to the current query. + Reply *GoogleCloudDiscoveryengineV1betaReply `json:"reply,omitempty"` + + // SearchResults: Search Results. + SearchResults []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"searchResults,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Conversation") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7795,30 +8613,34 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AutoGenerateIds") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Conversation") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1betaConverseConversationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaConverseConversationResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource: -// The inline source for the input config for ImportDocuments method. -type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { - // Documents: Required. A list of documents to update/create. Each - // document must have a valid Document.id. Recommended max of 100 items. - Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` +// 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"` - // ForceSendFields is a list of field names (e.g. "Documents") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7826,7 +8648,7 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7835,27 +8657,25 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateDataStoreMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of -// the ImportDocumentsRequest. If the long running operation is done, -// then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// 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"` - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,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. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7863,31 +8683,32 @@ type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1betaCreateEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of -// destination for Import related errors. -type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { - // GcsPrefix: Cloud Storage prefix for import errors. This must be an - // empty, existing Cloud Storage directory. Import errors are written to - // sharded files in this directory, one per line, as a JSON-encoded - // `google.rpc.Status` message. - GcsPrefix string `json:"gcsPrefix,omitempty"` +// GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata: Metadata for +// Create Schema LRO. +type GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsPrefix") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7895,7 +8716,7 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsPrefix") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -7904,17 +8725,17 @@ type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig +func (s *GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadat -// a: Metadata related to the progress of the -// ImportSuggestionDenyListEntries operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.CreateTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` @@ -7939,28 +8760,24 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest -// : Request message for -// CompletionService.ImportSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest struct { - // GcsSource: Cloud Storage location for the input content. Only 1 file - // can be specified that contains all entries to import. Supported - // values `gcs_source.schema` for autocomplete suggestion deny list - // entry imports: * `suggestion_deny_list` (default): One JSON - // [SuggestionDenyListEntry] per line. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` +// GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest: Request +// message for SiteSearchEngineService.CreateTargetSite method. +type GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest struct { + // Parent: Required. Parent resource name of TargetSite, such as + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine`. + Parent string `json:"parent,omitempty"` - // InlineSource: The Inline source for the input content for suggestion - // deny list entries. - InlineSource *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` + // TargetSite: Required. The TargetSite to create. + TargetSite *GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSite,omitempty"` - // ForceSendFields is a list of field names (e.g. "GcsSource") to + // ForceSendFields is a list of field names (e.g. "Parent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7968,8 +8785,8 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GcsSource") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Parent") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -7977,20 +8794,29 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest +func (s *GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCreateTargetSiteRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest -// InlineSource: The inline source for SuggestionDenyListEntry. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource struct { - // Entries: Required. A list of all denylist entries to import. Max of - // 1000 items. - Entries []*GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry `json:"entries,omitempty"` +// GoogleCloudDiscoveryengineV1betaCustomAttribute: A custom attribute +// that is not explicitly modeled in a resource, e.g. UserEvent. +type GoogleCloudDiscoveryengineV1betaCustomAttribute struct { + // Numbers: The numerical values of this custom attribute. For example, + // `[2.3, 15.4]` when the key is "lengths_cm". Exactly one of + // CustomAttribute.text or CustomAttribute.numbers should be set. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Numbers []float64 `json:"numbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Entries") to + // Text: The textual values of this custom attribute. For example, + // `["yellow", "green"]` when the key is "color". Empty string is not + // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. Exactly + // one of CustomAttribute.text or CustomAttribute.numbers should be set. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Text []string `json:"text,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Numbers") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -7998,7 +8824,7 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlin // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Entries") to include in + // NullFields is a list of field names (e.g. "Numbers") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8007,29 +8833,112 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlin NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRespons -// e: Response message for -// CompletionService.ImportSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaCustomAttribute) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaCustomAttribute + var s1 struct { + Numbers []gensupport.JSONFloat64 `json:"numbers"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Numbers = make([]float64, len(s1.Numbers)) + for i := range s1.Numbers { + s.Numbers[i] = float64(s1.Numbers[i]) + } + return nil +} - // FailedEntriesCount: Count of deny list entries that failed to be - // imported. - FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaDataStore: DataStore captures global +// settings and configs at the DataStore level. +type GoogleCloudDiscoveryengineV1betaDataStore struct { + // ContentConfig: Immutable. The content config of the data store. If + // this field is unset, the server behavior defaults to + // ContentConfig.NO_CONTENT. + // + // Possible values: + // "CONTENT_CONFIG_UNSPECIFIED" - Default value. + // "NO_CONTENT" - Only contains documents without any + // Document.content. + // "CONTENT_REQUIRED" - Only contains documents with Document.content. + // "PUBLIC_WEBSITE" - The data store is used for public website + // search. + ContentConfig string `json:"contentConfig,omitempty"` - // ImportedEntriesCount: Count of deny list entries successfully - // imported. - ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` + // CreateTime: Output only. Timestamp the DataStore was created at. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // DefaultSchemaId: Output only. The id of the default Schema + // asscociated to this data store. + DefaultSchemaId string `json:"defaultSchemaId,omitempty"` + + // DisplayName: Required. The data store display name. This field must + // be a UTF-8 encoded string with a length limit of 128 characters. + // Otherwise, an INVALID_ARGUMENT error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DocumentProcessingConfig: Configuration for Document understanding + // and enrichment. + DocumentProcessingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig `json:"documentProcessingConfig,omitempty"` + + // IndustryVertical: Immutable. The industry vertical that the data + // store registers. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The full resource name of the data store. Format: + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. This field must be a UTF-8 encoded string + // with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // SolutionTypes: The solutions that the data store enrolls. Available + // solutions for each industry_vertical: * `MEDIA`: + // `SOLUTION_TYPE_RECOMMENDATION` and `SOLUTION_TYPE_SEARCH`. * + // `SITE_SEARCH`: `SOLUTION_TYPE_SEARCH` is automatically enrolled. + // Other solutions cannot be enrolled. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionTypes []string `json:"solutionTypes,omitempty"` + + // StartingSchema: The start schema to use for this DataStore when + // provisioning it. If unset, a default vertical specialized schema will + // be used. This field is only used by CreateDataStore API, and will be + // ignored if used in other APIs. This field will be omitted from all + // API responses including CreateDataStore API. To retrieve a schema of + // a DataStore, use SchemaService.GetSchema API instead. The provided + // schema will be validated against certain rules on schema. Learn more + // from this doc + // (https://cloud.google.com/generative-ai-app-builder/docs/provide-schema). + StartingSchema *GoogleCloudDiscoveryengineV1betaSchema `json:"startingSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ContentConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8037,7 +8946,7 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse str // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include + // NullFields is a list of field names (e.g. "ContentConfig") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -8046,26 +8955,20 @@ type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse +func (s *GoogleCloudDiscoveryengineV1betaDataStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDataStore raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata -// related to the progress of the Import operation. This is returned by -// the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { +// GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata: Metadata +// related to the progress of the DataStoreService.DeleteDataStore +// operation. This will be returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata struct { // CreateTime: Operation create time. CreateTime string `json:"createTime,omitempty"` - // FailureCount: Count of entries that encountered errors while - // processing. - FailureCount int64 `json:"failureCount,omitempty,string"` - - // SuccessCount: Count of entries that were processed successfully. - SuccessCount int64 `json:"successCount,omitempty,string"` - // UpdateTime: Operation last update time. If the operation is done, // this is also the finish time. UpdateTime string `json:"updateTime,omitempty"` @@ -8087,29 +8990,25 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata +func (s *GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteDataStoreMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request -// message for the ImportUserEvents request. -type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { - // BigquerySource: BigQuery input source. - BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - - // ErrorConfig: The desired location of errors incurred during the - // Import. Cannot be set for inline user event imports. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // GcsSource: Cloud Storage location for the input content. - GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` +// GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata: Metadata +// related to the progress of the EngineService.DeleteEngine operation. +// This will be returned by the google.longrunning.Operation.metadata +// field. +type GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // InlineSource: The Inline source for the input content for UserEvents. - InlineSource *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource `json:"inlineSource,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. "BigquerySource") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8117,30 +9016,32 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BigquerySource") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequest +func (s *GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource: -// The inline source for the input config for ImportUserEvents method. -type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct { - // UserEvents: Required. A list of user events to import. Recommended - // max of 10k items. - UserEvents []*GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvents,omitempty"` +// GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata: Metadata for +// DeleteSchema LRO. +type GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserEvents") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8148,7 +9049,7 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserEvents") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8157,35 +9058,25 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource +func (s *GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteSchemaMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of -// the ImportUserEventsRequest. If the long running operation was -// successful, then this message is returned by the -// google.longrunning.Operations.response field if the operation was -// successful. -type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { - // ErrorConfig: Echoes the destination for the complete errors if this - // field was set in the request. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - - // JoinedEventsCount: Count of user events imported with complete - // existing Documents. - JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.DeleteTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // UnjoinedEventsCount: Count of user events imported, but with Document - // information not found in the existing Branch. - UnjoinedEventsCount int64 `json:"unjoinedEventsCount,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. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8193,36 +9084,34 @@ type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse +func (s *GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDeleteTargetSiteMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. -type GoogleCloudDiscoveryengineV1betaInterval struct { - // ExclusiveMaximum: Exclusive upper bound. - ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - - // ExclusiveMinimum: Exclusive lower bound. - ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` - - // Maximum: Inclusive upper bound. - Maximum float64 `json:"maximum,omitempty"` +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.DisableAdvancedSiteSearch operation. This +// will be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Minimum: Inclusive lower bound. - Minimum float64 `json:"minimum,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. "ExclusiveMaximum") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8230,57 +9119,87 @@ type GoogleCloudDiscoveryengineV1betaInterval struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExclusiveMaximum") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaInterval +func (s *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaInterval - var s1 struct { - ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` - ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` - Maximum gensupport.JSONFloat64 `json:"maximum"` - Minimum gensupport.JSONFloat64 `json:"minimum"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) - s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) - s.Maximum = float64(s1.Maximum) - s.Minimum = float64(s1.Minimum) - return nil +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest: +// Request message for SiteSearchEngineService.DisableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest struct { } -// GoogleCloudDiscoveryengineV1betaListConversationsResponse: Response -// for ListConversations method. -type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { - // Conversations: All the Conversations for a given data store. - Conversations []*GoogleCloudDiscoveryengineV1betaConversation `json:"conversations,omitempty"` +// GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse: +// Response message for +// SiteSearchEngineService.DisableAdvancedSiteSearch method. +type GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchResponse struct { +} - // NextPageToken: Pagination token, if not returned indicates the last - // page. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaDocument: Document captures all raw +// metadata information of items to be recommended or searched. +type GoogleCloudDiscoveryengineV1betaDocument struct { + // Content: The unstructured data linked to this document. Content must + // be set if this document is under a `CONTENT_REQUIRED` data store. + Content *GoogleCloudDiscoveryengineV1betaDocumentContent `json:"content,omitempty"` + + // DerivedStructData: Output only. This field is OUTPUT_ONLY. It + // contains derived data that are not in the original input document. + DerivedStructData googleapi.RawMessage `json:"derivedStructData,omitempty"` + + // Id: Immutable. The identifier of the document. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + Id string `json:"id,omitempty"` + + // IndexTime: Output only. The last time the document was indexed. If + // this field is set, the document could be returned in search results. + // This field is OUTPUT_ONLY. If this field is not populated, it means + // the document has never been indexed. + IndexTime string `json:"indexTime,omitempty"` + + // JsonData: The JSON string representation of the document. It should + // conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + JsonData string `json:"jsonData,omitempty"` + + // Name: Immutable. The full resource name of the document. Format: + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/branches/{branch}/documents/{document_id}`. This + // field must be a UTF-8 encoded string with a length limit of 1024 + // characters. + Name string `json:"name,omitempty"` + + // ParentDocumentId: The identifier of the parent document. Currently + // supports at most two level document hierarchy. Id should conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length + // limit of 63 characters. + ParentDocumentId string `json:"parentDocumentId,omitempty"` + + // SchemaId: The identifier of the schema located in the same data + // store. + SchemaId string `json:"schemaId,omitempty"` + + // StructData: The structured JSON data for the document. It should + // conform to the registered Schema or an `INVALID_ARGUMENT` error is + // thrown. + StructData googleapi.RawMessage `json:"structData,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Conversations") to + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8288,37 +9207,49 @@ type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Conversations") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListConversationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListConversationsResponse +func (s *GoogleCloudDiscoveryengineV1betaDocument) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocument raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListDataStoresResponse: Response -// message for DataStoreService.ListDataStores method. -type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { - // DataStores: All the customer's DataStores. - DataStores []*GoogleCloudDiscoveryengineV1betaDataStore `json:"dataStores,omitempty"` +// GoogleCloudDiscoveryengineV1betaDocumentContent: Unstructured data +// linked to this document. +type GoogleCloudDiscoveryengineV1betaDocumentContent struct { + // MimeType: The MIME type of the content. Supported types: * + // `application/pdf` (PDF, only native PDFs are supported for now) * + // `text/html` (HTML) * + // `application/vnd.openxmlformats-officedocument.wordprocessingml.docume + // nt` (DOCX) * + // `application/vnd.openxmlformats-officedocument.presentationml.presenta + // tion` (PPTX) * `text/plain` (TXT) See + // https://www.iana.org/assignments/media-types/media-types.xhtml. + MimeType string `json:"mimeType,omitempty"` - // NextPageToken: A token that can be sent as - // ListDataStoresRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // RawBytes: The content represented as a stream of bytes. The maximum + // length is 1,000,000 bytes (1 MB / ~0.95 MiB). Note: As with all + // `bytes` fields, this field is represented as pure binary in Protocol + // Buffers and base64-encoded string in JSON. For example, + // `abc123!?$*&()'-=@~` should be represented as + // `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See + // https://developers.google.com/protocol-buffers/docs/proto3#json. + RawBytes string `json:"rawBytes,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Uri: The URI of the content. Only Cloud Storage URIs (e.g. + // `gs://bucket-name/path/to/file`) are supported. The maximum file size + // is 2.5 MB for text-based formats, 100 MB for other formats. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStores") to + // ForceSendFields is a list of field names (e.g. "MimeType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8326,7 +9257,7 @@ type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStores") to include in + // NullFields is a list of field names (e.g. "MimeType") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8335,28 +9266,38 @@ type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListDataStoresResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListDataStoresResponse +func (s *GoogleCloudDiscoveryengineV1betaDocumentContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentContent raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListDocumentsResponse: Response -// message for DocumentService.ListDocuments method. -type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { - // Documents: The Documents. - Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` +// GoogleCloudDiscoveryengineV1betaDocumentInfo: Detailed document +// information associated with a user event. +type GoogleCloudDiscoveryengineV1betaDocumentInfo struct { + // Id: The Document resource ID. + Id string `json:"id,omitempty"` - // NextPageToken: A token that can be sent as - // ListDocumentsRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` + // Name: The Document resource full name, of the form: + // `projects/{project_id}/locations/{location}/collections/{collection_id + // }/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_ + // id}` + Name string `json:"name,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // PromotionIds: The promotion IDs associated with this Document. + // Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "Documents") to + // Quantity: Quantity of the Document associated with the user event. + // Defaults to 1. For example, this field will be 2 if two quantities of + // the same Document are involved in a `add-to-cart` event. Required for + // events of the following event types: * `add-to-cart` * `purchase` + Quantity int64 `json:"quantity,omitempty"` + + // Uri: The Document URI - only allowed for website data stores. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Id") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8364,8 +9305,8 @@ type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Documents") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Id") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -8373,64 +9314,151 @@ type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1betaDocumentInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListEnginesResponse: Response message -// for EngineService.ListEngines method. -type GoogleCloudDiscoveryengineV1betaListEnginesResponse struct { - // Engines: All the customer's Engines. - Engines []*GoogleCloudDiscoveryengineV1betaEngine `json:"engines,omitempty"` +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig: A singleton +// resource of DataStore. It's empty when DataStore is created, which +// defaults to digital parser. The first call to +// DataStoreService.UpdateDocumentProcessingConfig method will +// initialize the config. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig struct { + // DefaultParsingConfig: Configurations for default Document parser. If + // not specified, we will configure it as default DigitalParsingConfig, + // and the default parsing config will be applied to all file types for + // Document parsing. + DefaultParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"defaultParsingConfig,omitempty"` - // NextPageToken: Not supported. - NextPageToken string `json:"nextPageToken,omitempty"` + // Name: The full resource name of the Document Processing Config. + // Format: + // `projects/*/locations/*/collections/*/dataStores/*/documentProcessingC + // onfig`. + Name string `json:"name,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ParsingConfigOverrides: Map from file type to override the default + // parsing configuration based on the file type. Supported keys: * + // `pdf`: Override parsing config for PDF files, either digital parsing, + // ocr parsing or layout parsing is supported. * `html`: Override + // parsing config for HTML files, only digital parsing and or layout + // parsing are supported. * `docx`: Override parsing config for DOCX + // files, only digital parsing and or layout parsing are supported. + ParsingConfigOverrides map[string]GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig `json:"parsingConfigOverrides,omitempty"` - // ForceSendFields is a list of field names (e.g. "Engines") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "DefaultParsingConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Engines") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DefaultParsingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListEnginesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListEnginesResponse +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListSchemasResponse: Response message -// for SchemaService.ListSchemas method. -type GoogleCloudDiscoveryengineV1betaListSchemasResponse struct { - // NextPageToken: A token that can be sent as - // ListSchemasRequest.page_token to retrieve the next page. If this - // field is omitted, there are no subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig: +// +// Related configurations applied to a specific type of document +// +// parser. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig struct { + // DigitalParsingConfig: Configurations applied to digital parser. + DigitalParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig `json:"digitalParsingConfig,omitempty"` - // Schemas: The Schemas. - Schemas []*GoogleCloudDiscoveryengineV1betaSchema `json:"schemas,omitempty"` + // OcrParsingConfig: Configurations applied to OCR parser. Currently it + // only applies to PDFs. + OcrParsingConfig *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig `json:"ocrParsingConfig,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. + // "DigitalParsingConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // NullFields is a list of field names (e.g. "DigitalParsingConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigD +// igitalParsingConfig: The digital parsing configurations for +// documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigDigitalParsingConfig struct { +} + +// GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigO +// crParsingConfig: The OCR parsing configurations for documents. +type GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig struct { + // EnhancedDocumentElements: Apply additional enhanced OCR processing to + // a list of document elements. Supported values: * `table`: advanced + // table parsing model. + EnhancedDocumentElements []string `json:"enhancedDocumentElements,omitempty"` + + // UseNativeText: If true, will use native text instead of OCR text on + // pages containing native text. + UseNativeText bool `json:"useNativeText,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnhancedDocumentElements") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EnhancedDocumentElements") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDocumentProcessingConfigParsingConfigOcrParsingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaDoubleList: Double list. +type GoogleCloudDiscoveryengineV1betaDoubleList struct { + // Values: Double values. + Values []float64 `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Values") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8438,36 +9466,45 @@ type GoogleCloudDiscoveryengineV1betaListSchemasResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListSchemasResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListSchemasResponse +func (s *GoogleCloudDiscoveryengineV1betaDoubleList) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListServingConfigsResponse: Response -// for ListServingConfigs method. -type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { - // NextPageToken: Pagination token, if not returned indicates the last - // page. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServingConfigs: All the ServingConfigs for a given dataStore. - ServingConfigs []*GoogleCloudDiscoveryengineV1betaServingConfig `json:"servingConfigs,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaDoubleList) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaDoubleList + var s1 struct { + Values []gensupport.JSONFloat64 `json:"values"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Values = make([]float64, len(s1.Values)) + for i := range s1.Values { + s.Values[i] = float64(s1.Values[i]) + } + return nil +} - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudDiscoveryengineV1betaEmbeddingConfig: Defines embedding +// config, used for bring your own embeddings feature. +type GoogleCloudDiscoveryengineV1betaEmbeddingConfig struct { + // FieldPath: Full field path in the schema mapped as embedding field. + FieldPath string `json:"fieldPath,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8475,41 +9512,34 @@ type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "FieldPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListServingConfigsResponse +func (s *GoogleCloudDiscoveryengineV1betaEmbeddingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEmbeddingConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaListTargetSitesResponse: Response -// message for SiteSearchEngineService.ListTargetSites method. -type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { - // NextPageToken: A token that can be sent as `page_token` to retrieve - // the next page. If this field is omitted, there are no subsequent - // pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // TargetSites: List of TargetSites. - TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - - // TotalSize: The total number of items matching the request. This will - // always be populated in the response. - TotalSize int64 `json:"totalSize,omitempty"` +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata: +// Metadata related to the progress of the +// SiteSearchEngineService.EnableAdvancedSiteSearch operation. This will +// be returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8517,47 +9547,122 @@ type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaListTargetSitesResponse +func (s *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaMediaInfo: Media-specific user event -// information. -type GoogleCloudDiscoveryengineV1betaMediaInfo struct { - // MediaProgressDuration: The media progress time in seconds, if - // applicable. For example, if the end user has finished 90 seconds of a - // playback video, then MediaInfo.media_progress_duration.seconds should - // be set to 90. - MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest: +// Request message for SiteSearchEngineService.EnableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest struct { +} - // MediaProgressPercentage: Media progress should be computed using only - // the media_progress_duration relative to the media total length. This - // value must be between `[0, 1.0]` inclusive. If this is not a playback - // or the progress cannot be computed (e.g. ongoing livestream), this - // field should be unset. - MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` +// GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse: +// Response message for SiteSearchEngineService.EnableAdvancedSiteSearch +// method. +type GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchResponse struct { +} - // ForceSendFields is a list of field names (e.g. - // "MediaProgressDuration") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. +// GoogleCloudDiscoveryengineV1betaEngine: Metadata that describes the +// training and serving parameters of an Engine. +type GoogleCloudDiscoveryengineV1betaEngine struct { + // ChatEngineConfig: Configurations for the Chat Engine. Only applicable + // if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig `json:"chatEngineConfig,omitempty"` + + // ChatEngineMetadata: Output only. Additional information of the Chat + // Engine. Only applicable if solution_type is SOLUTION_TYPE_CHAT. + ChatEngineMetadata *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata `json:"chatEngineMetadata,omitempty"` + + // CommonConfig: Common config spec that specifies the metadata of the + // engine. + CommonConfig *GoogleCloudDiscoveryengineV1betaEngineCommonConfig `json:"commonConfig,omitempty"` + + // CreateTime: Output only. Timestamp the Recommendation Engine was + // created at. + CreateTime string `json:"createTime,omitempty"` + + // DataStoreIds: The data stores associated with this engine. For + // SOLUTION_TYPE_SEARCH and SOLUTION_TYPE_RECOMMENDATION type of + // engines, they can only associate with at most one data store. If + // solution_type is SOLUTION_TYPE_CHAT, multiple DataStores in the same + // Collection can be associated here. Note that when used in + // CreateEngineRequest, one DataStore id must be provided as the system + // will use it for necessary initializations. + DataStoreIds []string `json:"dataStoreIds,omitempty"` + + // DisplayName: Required. The display name of the engine. Should be + // human readable. UTF-8 encoded string with limit of 1024 characters. + DisplayName string `json:"displayName,omitempty"` + + // IndustryVertical: The industry vertical that the engine registers. + // The restriction of the Engine industry vertical is based on + // DataStore: If unspecified, default to `GENERIC`. Vertical on Engine + // has to match vertical of the DataStore liniked to the engine. + // + // Possible values: + // "INDUSTRY_VERTICAL_UNSPECIFIED" - Value used when unset. + // "GENERIC" - The generic vertical for documents that are not + // specific to any industry vertical. + // "MEDIA" - The media industry vertical. + // "HEALTHCARE_FHIR" - The healthcare FHIR vertical. + IndustryVertical string `json:"industryVertical,omitempty"` + + // Name: Immutable. The fully qualified resource name of the engine. + // This field must be a UTF-8 encoded string with a length limit of 1024 + // characters. Format: + // `projects/{project_number}/locations/{location}/collections/{collectio + // n}/engines/{engine}` engine should be 1-63 characters, and valid + // characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is + // returned. + Name string `json:"name,omitempty"` + + // SearchEngineConfig: Configurations for the Search Engine. Only + // applicable if solution_type is SOLUTION_TYPE_SEARCH. + SearchEngineConfig *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig `json:"searchEngineConfig,omitempty"` + + // SolutionType: Required. The solutions of the engine. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionType string `json:"solutionType,omitempty"` + + // UpdateTime: Output only. Timestamp the Recommendation Engine was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ChatEngineConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MediaProgressDuration") to + // NullFields is a list of field names (e.g. "ChatEngineConfig") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -8567,102 +9672,88 @@ type GoogleCloudDiscoveryengineV1betaMediaInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo +func (s *GoogleCloudDiscoveryengineV1betaEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngine raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo - var s1 struct { - MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) - return nil -} - -// GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. -type GoogleCloudDiscoveryengineV1betaPageInfo struct { - // PageCategory: The most specific category associated with a category - // page. To represent full path of category, use '>' sign to separate - // different hierarchies. If '>' is part of the category name, please - // replace it with other character(s). Category pages include special - // pages such as sales or promotions. For instance, a special sale page - // may have the category hierarchy: "pageCategory" : "Sales > 2017 - // Black Friday Deals". Required for `view-category-page` events. Other - // event types should not set this field. Otherwise, an - // `INVALID_ARGUMENT` error is returned. - PageCategory string `json:"pageCategory,omitempty"` - - // PageviewId: A unique ID of a web page view. This should be kept the - // same for all user events triggered from the same pageview. For - // example, an item detail page view could trigger multiple events as - // the user is browsing the page. The `pageview_id` property should be - // kept the same for all these events so that they can be grouped - // together properly. When using the client side event reporting with - // JavaScript pixel and Google Tag Manager, this value is filled in - // automatically. - PageviewId string `json:"pageviewId,omitempty"` - - // ReferrerUri: The referrer URL of the current page. When using the - // client side event reporting with JavaScript pixel and Google Tag - // Manager, this value is filled in automatically. However, some browser - // privacy restrictions may cause this field to be empty. - ReferrerUri string `json:"referrerUri,omitempty"` +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig: +// Configurations for a Chat Engine. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig struct { + // AgentCreationConfig: The configurationt generate the Dialogflow agent + // that is associated to this Engine. Note that these configurations are + // one-time consumed by and passed to Dialogflow service. It means they + // cannot be retrieved using EngineService.GetEngine or + // EngineService.ListEngines API after engine creation. + AgentCreationConfig *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig `json:"agentCreationConfig,omitempty"` - // Uri: Complete URL (window.location.href) of the user's current page. - // When using the client side event reporting with JavaScript pixel and - // Google Tag Manager, this value is filled in automatically. Maximum - // length 5,000 characters. - Uri string `json:"uri,omitempty"` + // DialogflowAgentToLink: The resource name of an exist Dialogflow agent + // to link to this Chat Engine. Customers can either provide + // `agent_creation_config` to create agent or provide an agent name that + // links the agent with the Chat engine. Format: + // `projects//locations//agents/`. Note that the + // `dialogflow_agent_to_link` are one-time consumed by and passed to + // Dialogflow service. It means they cannot be retrieved using + // EngineService.GetEngine or EngineService.ListEngines API after engine + // creation. Please use ChatEngineMetadata.dialogflow_agent for actual + // agent association after Engine is created. + DialogflowAgentToLink string `json:"dialogflowAgentToLink,omitempty"` - // ForceSendFields is a list of field names (e.g. "PageCategory") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "AgentCreationConfig") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PageCategory") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AgentCreationConfig") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPageInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPageInfo +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPanelInfo: Detailed panel information -// associated with a user event. -type GoogleCloudDiscoveryengineV1betaPanelInfo struct { - // DisplayName: The display name of the panel. - DisplayName string `json:"displayName,omitempty"` +// GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationCon +// fig: Configurations for generating a Dialogflow agent. Note that +// these configurations are one-time consumed by and passed to +// Dialogflow service. It means they cannot be retrieved using +// EngineService.GetEngine or EngineService.ListEngines API after engine +// creation. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig struct { + // Business: Name of the company, organization or other entity that the + // agent represents. Used for knowledge connector LLM prompt and for + // knowledge search. + Business string `json:"business,omitempty"` - // PanelId: Required. The panel ID. - PanelId string `json:"panelId,omitempty"` + // DefaultLanguageCode: Required. The default language of the agent as a + // language tag. See Language Support + // (https://cloud.google.com/dialogflow/docs/reference/language) for a + // list of the currently supported language codes. + DefaultLanguageCode string `json:"defaultLanguageCode,omitempty"` - // PanelPosition: The ordered position of the panel, if shown to the - // user with other panels. If set, then total_panels must also be set. - PanelPosition int64 `json:"panelPosition,omitempty"` + // Location: Agent location for Agent creation, supported values: + // global/us/eu. If not provided, us Engine will create Agent using + // us-central-1 by default; eu Engine will create Agent using eu-west-1 + // by default. + Location string `json:"location,omitempty"` - // TotalPanels: The total number of panels, including this one, shown to - // the user. Must be set if panel_position is set. - TotalPanels int64 `json:"totalPanels,omitempty"` + // TimeZone: Required. The time zone of the agent from the time zone + // database (https://www.iana.org/time-zones), e.g., America/New_York, + // Europe/Paris. + TimeZone string `json:"timeZone,omitempty"` - // ForceSendFields is a list of field names (e.g. "DisplayName") to + // ForceSendFields is a list of field names (e.g. "Business") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8670,49 +9761,29 @@ type GoogleCloudDiscoveryengineV1betaPanelInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Business") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPanelInfo +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineConfigAgentCreationConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPauseEngineRequest: Request for -// pausing training of an engine. -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. - 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"` +// GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata: Additional +// information of a Chat Engine. Fields in this message are output only. +type GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata struct { + // DialogflowAgent: The resource name of a Dialogflow agent, that this + // Chat Engine refers to. Format: `projects//locations//agents/`. + DialogflowAgent string `json:"dialogflowAgent,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "DialogflowAgent") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8720,33 +9791,31 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "DialogflowAgent") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata +func (s *GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineChatEngineMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest: Request -// message for DocumentService.PurgeDocuments method. -type GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest struct { - // Filter: Required. Filter matching documents to purge. Only currently - // supported value is `*` (all items). - Filter string `json:"filter,omitempty"` - - // Force: Actually performs the purge. If `force` is set to false, - // return the expected purge count without deleting any documents. - Force bool `json:"force,omitempty"` +// 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 string `json:"companyName,omitempty"` - // ForceSendFields is a list of field names (e.g. "Filter") to + // ForceSendFields is a list of field names (e.g. "CompanyName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8754,36 +9823,45 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "CompanyName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest +func (s *GoogleCloudDiscoveryengineV1betaEngineCommonConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineCommonConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, 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"` +// GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig: +// Configurations for a Search Engine. +type GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig struct { + // SearchAddOns: The add-on that this search engine enables. + // + // Possible values: + // "SEARCH_ADD_ON_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_ADD_ON_LLM" - Large language model add-on. + SearchAddOns []string `json:"searchAddOns,omitempty"` - // 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"` + // SearchTier: The search feature tier of this engine. Different tiers + // might have different pricing. To learn more, please check the pricing + // documentation. Defaults to SearchTier.SEARCH_TIER_STANDARD if not + // specified. + // + // Possible values: + // "SEARCH_TIER_UNSPECIFIED" - Default value when the enum is + // unspecified. This is invalid to use. + // "SEARCH_TIER_STANDARD" - Standard tier. + // "SEARCH_TIER_ENTERPRISE" - Enterprise tier. + SearchTier string `json:"searchTier,omitempty"` - // ForceSendFields is a list of field names (e.g. "PurgeCount") to + // ForceSendFields is a list of field names (e.g. "SearchAddOns") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8791,34 +9869,38 @@ type GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "SearchAddOns") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse +func (s *GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaEngineSearchEngineConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata -// : Metadata related to the progress of the -// PurgeSuggestionDenyListEntries operation. This is returned by the -// google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaFactChunk: Fact Chunk. +type GoogleCloudDiscoveryengineV1betaFactChunk struct { + // ChunkText: Text content of the fact chunk. Can be at most 10K + // characters long. + ChunkText string `json:"chunkText,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // Source: Source from which this fact chunk was retrieved. If it was + // retrieved from the GroundingFacts provided in the request then this + // field will contain the index of the specific fact from which this + // chunk was retrieved. + Source string `json:"source,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // SourceMetadata: More fine-grained information for the source + // reference. + SourceMetadata map[string]string `json:"sourceMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8826,7 +9908,7 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // NullFields is a list of field names (e.g. "ChunkText") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8835,32 +9917,36 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata +func (s *GoogleCloudDiscoveryengineV1betaFactChunk) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFactChunk raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest: +// GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse: // -// Request message for CompletionService.PurgeSuggestionDenyListEntries +// Response message for // -// method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest struct { -} +// SiteSearchEngineService.FetchDomainVerificationStatus method. +type GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` -// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse -// : Response message for -// CompletionService.PurgeSuggestionDenyListEntries method. -type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { - // ErrorSamples: A sample of errors encountered while processing the - // request. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // TargetSites: List of TargetSites containing the site verification + // status. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // PurgeCount: Number of suggestion deny list entries purged. - PurgeCount int64 `json:"purgeCount,omitempty,string"` + // TotalSize: The total number of items matching the request. This will + // always be populated in the response. + TotalSize int64 `json:"totalSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8868,7 +9954,7 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse stru // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorSamples") to include + // NullFields is a list of field names (e.g. "NextPageToken") to include // in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. However, any field with // an empty value appearing in NullFields will be sent to the server as @@ -8877,72 +9963,28 @@ type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse stru NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaRankRequest: Request message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankRequest struct { - // IgnoreRecordDetailsInResponse: If true, the response will contain - // only record ID and score. By default, it is false, the response will - // contain record details. - IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` - - // Model: The identifier of the model to use. It is one of: * - // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn - // input token size 512. It is set to `semantic-ranker-512@latest` by - // default if unspecified. - Model string `json:"model,omitempty"` - - // Query: The query to use. - Query string `json:"query,omitempty"` - - // Records: Required. A list of records to rank. - Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` - - // TopN: The number of results to return. If this is unset or no bigger - // than zero, returns all results. - TopN int64 `json:"topN,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "IgnoreRecordDetailsInResponse") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "IgnoreRecordDetailsInResponse") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaRankRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankRequest +func (s *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRankResponse: Response message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankResponse struct { - // Records: A list of records sorted by descending score. - Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` +// GoogleCloudDiscoveryengineV1betaFhirStoreSource: Cloud FhirStore +// source import data from. +type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { + // FhirStore: Required. The full resource name of the FHIR store to + // import data from, in the format of + // `projects/{project}/locations/{location}/datasets/{dataset}/fhirStores + // /{fhir_store}`. + FhirStore string `json:"fhirStore,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the FhirStore export to a specific Cloud Storage + // directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // ForceSendFields is a list of field names (e.g. "Records") to + // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8950,7 +9992,7 @@ type GoogleCloudDiscoveryengineV1betaRankResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Records") to include in + // NullFields is a list of field names (e.g. "FhirStore") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -8959,33 +10001,37 @@ type GoogleCloudDiscoveryengineV1betaRankResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRankResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankResponse +func (s *GoogleCloudDiscoveryengineV1betaFhirStoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFhirStoreSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRankingRecord: Record message for -// RankService.Rank method. -type GoogleCloudDiscoveryengineV1betaRankingRecord struct { - // Content: The content of the record. Empty by default. At least one of - // title or content should be set otherwise an INVALID_ARGUMENT error is - // thrown. - Content string `json:"content,omitempty"` +// GoogleCloudDiscoveryengineV1betaFirestoreSource: Firestore source +// import data from. +type GoogleCloudDiscoveryengineV1betaFirestoreSource struct { + // CollectionId: Required. The Firestore collection to copy the data + // from with a length limit of 1,500 characters. + CollectionId string `json:"collectionId,omitempty"` - // Id: The unique ID to represent the record. - Id string `json:"id,omitempty"` + // DatabaseId: Required. The Firestore database to copy the data from + // with a length limit of 256 characters. + DatabaseId string `json:"databaseId,omitempty"` - // Score: The score of this record based on the given query and selected - // model. - Score float64 `json:"score,omitempty"` + // GcsStagingDir: Intermediate Cloud Storage directory used for the + // import with a length limit of 2,000 characters. Can be specified if + // one wants to have the Firestore export to a specific Cloud Storage + // directory. Please ensure that the Firestore service account has the + // necessary Cloud Storage Admin permissions to access the specified + // Cloud Storage directory. + GcsStagingDir string `json:"gcsStagingDir,omitempty"` - // Title: The title of the record. Empty by default. At least one of - // title or content should be set otherwise an INVALID_ARGUMENT error is - // thrown. - Title string `json:"title,omitempty"` + // ProjectId: The project ID that the Cloud SQL source is in with a + // length limit of 128 characters. If not specified, inherits the + // project ID from the parent request. + ProjectId string `json:"projectId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to + // ForceSendFields is a list of field names (e.g. "CollectionId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -8993,7 +10039,57 @@ type GoogleCloudDiscoveryengineV1betaRankingRecord struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "CollectionId") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaFirestoreSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaFirestoreSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaGcsSource: Cloud Storage location for +// input content. +type GoogleCloudDiscoveryengineV1betaGcsSource struct { + // DataSchema: The schema to use when parsing the data from the source. + // Supported values for document imports: * `document` (default): One + // JSON Document per line. Each document must have a valid Document.id. + // * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by + // `input_uris` becomes a document, with the ID set to the first 128 + // bits of SHA256(URI) encoded as a hex string. * `custom`: One custom + // data JSON per row in arbitrary format that conforms to the defined + // Schema of the data store. This can only be used by the GENERIC Data + // Store vertical. * `csv`: A CSV file with header conforming to the + // defined Schema of the data store. Each entry after the header is + // imported as a Document. This can only be used by the GENERIC Data + // Store vertical. Supported values for user even imports: * + // `user_event` (default): One JSON UserEvent per line. + DataSchema string `json:"dataSchema,omitempty"` + + // InputUris: Required. Cloud Storage URIs to input files. URI can be up + // to 2000 characters long. URIs can match the full object path (for + // example, `gs://bucket/directory/object.json`) or a pattern matching + // one or more files, such as `gs://bucket/directory/*.json`. A request + // can contain at most 100 files (or 100,000 files if `data_schema` is + // `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` + // is `content`). + InputUris []string `json:"inputUris,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DataSchema") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DataSchema") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9002,109 +10098,68 @@ type GoogleCloudDiscoveryengineV1betaRankingRecord struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord +func (s *GoogleCloudDiscoveryengineV1betaGcsSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaGcsSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord - var s1 struct { - Score gensupport.JSONFloat64 `json:"score"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Score = float64(s1.Score) - return nil +// GoogleCloudDiscoveryengineV1betaGroundingFact: Grounding Fact. +type GoogleCloudDiscoveryengineV1betaGroundingFact struct { + // Attributes: Attributes associated with the fact. Common attributes + // include `source` (indicating where the fact was sourced from), + // `author` (indicating the author of the fact), and so on. + Attributes map[string]string `json:"attributes,omitempty"` + + // FactText: Text content of the fact. Can be at most 10K characters + // long. + FactText string `json:"factText,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Attributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` } -// GoogleCloudDiscoveryengineV1betaRecommendRequest: Request message for -// Recommend method. -type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { - // Filter: Filter for restricting recommendation results with a length - // limit of 5,000 characters. Currently, only filter expressions on the - // `filter_tags` attribute is supported. Examples: * `(filter_tags: - // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * - // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: - // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the - // `params` field, then attribute-based expressions are expected instead - // of the above described tag-based syntax. Examples: * (launguage: - // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: - // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) - // If your filter blocks all results, the API will return generic - // (unfiltered) popular Documents. If you only want results strictly - // matching the filters, set `strictFiltering` to True in - // RecommendRequest.params to receive empty results instead. Note that - // the API will never return Documents with `storageStatus` of `EXPIRED` - // or `DELETED` regardless of filter choices. - Filter string `json:"filter,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaGroundingFact) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaGroundingFact + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // PageSize: Maximum number of results to return. Set this property to - // the number of recommendation results needed. If zero, the service - // will choose a reasonable default. The maximum allowed value is 100. - // Values above 100 will be coerced to 100. - PageSize int64 `json:"pageSize,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata: Metadata +// related to the progress of the ImportDocuments operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Params: Additional domain specific parameters for the - // recommendations. Allowed values: * `returnDocument`: Boolean. If set - // to true, the associated Document object will be returned in - // RecommendResponse.RecommendationResult.document. * `returnScore`: - // Boolean. If set to true, the recommendation 'score' corresponding to - // each returned Document will be set in - // RecommendResponse.RecommendationResult.metadata. The given 'score' - // indicates the probability of a Document conversion given the user's - // context and history. * `strictFiltering`: Boolean. True by default. - // If set to false, the service will return generic (unfiltered) popular - // Documents instead of empty if your filter blocks all recommendation - // results. * `diversityLevel`: String. Default empty. If set to be - // non-empty, then it needs to be one of: * `no-diversity` * - // `low-diversity` * `medium-diversity` * `high-diversity` * - // `auto-diversity` This gives request-level control and adjusts - // recommendation results based on Document category. * - // `attributeFilteringSyntax`: Boolean. False by default. If set to - // true, the `filter` field is interpreted according to the new, - // attribute-based syntax. - Params googleapi.RawMessage `json:"params,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // UserEvent: Required. Context about the user, what they are looking at - // and what action they took to trigger the Recommend request. Note that - // this user event detail won't be ingested to userEvent logs. Thus, a - // separate userEvent write request is required for event logging. Don't - // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the - // same fixed ID for different users. If you are trying to receive - // non-personalized recommendations (not recommended; this can - // negatively impact model performance), instead set - // UserEvent.user_pseudo_id to a random unique ID and leave - // UserEvent.user_info.user_id unset. - UserEvent *GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvent,omitempty"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // UserLabels: The user labels applied to a resource must meet the - // following requirements: * Each resource can have multiple labels, up - // to a maximum of 64. * Each label must be a key-value pair. * Keys - // have a minimum length of 1 character and a maximum length of 63 - // characters and cannot be empty. Values can be empty and have a - // maximum length of 63 characters. * Keys and values can contain only - // lowercase letters, numeric characters, underscores, and dashes. All - // characters must use UTF-8 encoding, and international characters are - // allowed. * The key portion of a label must be unique. However, you - // can use the same key with multiple resources. * Keys must start with - // a lowercase letter or international character. See Requirements for - // labels - // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - // for more details. - UserLabels map[string]string `json:"userLabels,omitempty"` + // TotalCount: Total count of entries that were processed. + TotalCount int64 `json:"totalCount,omitempty,string"` - // ValidateOnly: Use validate only mode for this recommendation query. - // If set to true, a fake model will be used that returns arbitrary - // Document IDs. Note that the validate only mode should only be used - // for testing the API, or if the model is not ready. - ValidateOnly bool `json:"validateOnly,omitempty"` + // 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. "Filter") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9112,8 +10167,8 @@ type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Filter") to include in API - // requests with the JSON null value. By default, fields with empty + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9121,36 +10176,94 @@ type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRecommendRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendRequest +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecommendResponse: Response message -// for Recommend method. -type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { - // AttributionToken: A unique attribution token. This should be included - // in the UserEvent logs resulting from this recommendation, which - // enables accurate attribution of recommendation model performance. - AttributionToken string `json:"attributionToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequest: Request +// message for Import methods. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequest struct { + // AutoGenerateIds: Whether to automatically generate IDs for the + // documents if absent. If set to `true`, Document.ids are automatically + // generated based on the hash of the payload, where IDs may not be + // consistent during multiple imports. In which case + // ReconciliationMode.FULL is highly recommended to avoid duplicate + // contents. If unset or set to `false`, Document.ids have to be + // specified using id_field, otherwise, documents without IDs fail to be + // imported. Supported data sources: * GcsSource. GcsSource.data_schema + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is + // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` + // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * + // SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. + AutoGenerateIds bool `json:"autoGenerateIds,omitempty"` - // MissingIds: IDs of documents in the request that were missing from - // the default Branch associated with the requested ServingConfig. - MissingIds []string `json:"missingIds,omitempty"` + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - // Results: A list of recommended Documents. The order represents the - // ranking (from the most relevant Document to the least). - Results []*GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult `json:"results,omitempty"` + // BigtableSource: Cloud Bigtable input source. + BigtableSource *GoogleCloudDiscoveryengineV1betaBigtableSource `json:"bigtableSource,omitempty"` - // ValidateOnly: True if RecommendRequest.validate_only was set. - ValidateOnly bool `json:"validateOnly,omitempty"` + // CloudSqlSource: Cloud SQL input source. + CloudSqlSource *GoogleCloudDiscoveryengineV1betaCloudSqlSource `json:"cloudSqlSource,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // ErrorConfig: The desired location of errors incurred during the + // Import. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "AttributionToken") to + // FhirStoreSource: FhirStore input source. + FhirStoreSource *GoogleCloudDiscoveryengineV1betaFhirStoreSource `json:"fhirStoreSource,omitempty"` + + // FirestoreSource: Firestore input source. + FirestoreSource *GoogleCloudDiscoveryengineV1betaFirestoreSource `json:"firestoreSource,omitempty"` + + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + + // IdField: The field indicates the ID field or column to be used as + // unique IDs of the documents. For GcsSource it is the key of the JSON + // field. For instance, `my_id` for JSON `{"my_id": "some_uuid"}`. For + // others, it may be the column name of the table where the unique ids + // are stored. The values of the JSON field or the table column are used + // as the Document.ids. The JSON field or the table column must be of + // string type, and the values must be set as valid strings conform to + // RFC-1034 (https://tools.ietf.org/html/rfc1034) with 1-63 characters. + // Otherwise, documents without valid IDs fail to be imported. Only set + // this field when auto_generate_ids is unset or set as `false`. + // Otherwise, an INVALID_ARGUMENT error is thrown. If it is unset, a + // default value `_id` is used when importing from the allowed data + // sources. Supported data sources: * GcsSource. GcsSource.data_schema + // must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is + // thrown. * BigQuerySource. BigQuerySource.data_schema must be `custom` + // or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown. * + // SpannerSource. * CloudSqlSource. * FirestoreSource. * BigtableSource. + IdField string `json:"idField,omitempty"` + + // InlineSource: The Inline source for the input content for documents. + InlineSource *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource `json:"inlineSource,omitempty"` + + // ReconciliationMode: The mode of reconciliation between existing + // documents and the documents to be imported. Defaults to + // ReconciliationMode.INCREMENTAL. + // + // Possible values: + // "RECONCILIATION_MODE_UNSPECIFIED" - Defaults to `INCREMENTAL`. + // "INCREMENTAL" - Inserts new documents or updates existing + // documents. + // "FULL" - Calculates diff and replaces the entire document dataset. + // Existing documents may be deleted if they are not present in the + // source location. + ReconciliationMode string `json:"reconciliationMode,omitempty"` + + // SpannerSource: Spanner input source. + SpannerSource *GoogleCloudDiscoveryengineV1betaSpannerSource `json:"spannerSource,omitempty"` + + // UpdateMask: Indicates which fields in the provided imported documents + // to update. If not set, the default is to update all fields. + UpdateMask string `json:"updateMask,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AutoGenerateIds") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9158,7 +10271,7 @@ type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributionToken") to + // NullFields is a list of field names (e.g. "AutoGenerateIds") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9168,31 +10281,20 @@ type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRecommendResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponse +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult: -// -// RecommendationResult represents a generic recommendation result with -// -// associated metadata. -type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struct { - // Document: Set if `returnDocument` is set to true in - // RecommendRequest.params. - Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` - - // Id: Resource ID of the recommended Document. - Id string `json:"id,omitempty"` - - // Metadata: Additional Document metadata / annotations. Possible - // values: * `score`: Recommendation score in double value. Is set if - // `returnScore` is set to true in RecommendRequest.params. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource: +// The inline source for the input config for ImportDocuments method. +type GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource struct { + // Documents: Required. A list of documents to update/create. Each + // document must have a valid Document.id. Recommended max of 100 items. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to + // ForceSendFields is a list of field names (e.g. "Documents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9200,7 +10302,7 @@ type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struc // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in + // NullFields is a list of field names (e.g. "Documents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9209,21 +10311,27 @@ type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struc NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest: Request message -// for SiteSearchEngineService.RecrawlUris method. -type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { - // Uris: Required. List of URIs to crawl. At most 10K URIs are - // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI - // should match at least one TargetSite in `site_search_engine`. - Uris []string `json:"uris,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportDocumentsResponse: Response of +// the ImportDocumentsRequest. If the long running operation is done, +// then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportDocumentsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "Uris") to + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9231,34 +10339,31 @@ type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Uris") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest +func (s *GoogleCloudDiscoveryengineV1betaImportDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaReply: Defines a reply message to -// user. -type GoogleCloudDiscoveryengineV1betaReply struct { - // References: References in the reply. - References []*GoogleCloudDiscoveryengineV1betaReplyReference `json:"references,omitempty"` - - // Reply: DEPRECATED: use `summary` instead. Text reply. - Reply string `json:"reply,omitempty"` - - // Summary: Summary based on search results. - Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportErrorConfig: Configuration of +// destination for Import related errors. +type GoogleCloudDiscoveryengineV1betaImportErrorConfig struct { + // GcsPrefix: Cloud Storage prefix for import errors. This must be an + // empty, existing Cloud Storage directory. Import errors are written to + // sharded files in this directory, one per line, as a JSON-encoded + // `google.rpc.Status` message. + GcsPrefix string `json:"gcsPrefix,omitempty"` - // ForceSendFields is a list of field names (e.g. "References") to + // ForceSendFields is a list of field names (e.g. "GcsPrefix") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9266,7 +10371,7 @@ type GoogleCloudDiscoveryengineV1betaReply struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "References") to include in + // NullFields is a list of field names (e.g. "GcsPrefix") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9275,28 +10380,25 @@ type GoogleCloudDiscoveryengineV1betaReply struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaReply) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaReply +func (s *GoogleCloudDiscoveryengineV1betaImportErrorConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportErrorConfig raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaReplyReference: Defines reference in -// reply. -type GoogleCloudDiscoveryengineV1betaReplyReference struct { - // AnchorText: Anchor text. - AnchorText string `json:"anchorText,omitempty"` - - // End: Anchor text end index. - End int64 `json:"end,omitempty"` - - // Start: Anchor text start index. - Start int64 `json:"start,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadat +// a: Metadata related to the progress of the +// ImportSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Uri: URI link reference. - Uri string `json:"uri,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. "AnchorText") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9304,7 +10406,7 @@ type GoogleCloudDiscoveryengineV1betaReplyReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AnchorText") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9313,38 +10415,28 @@ type GoogleCloudDiscoveryengineV1betaReplyReference struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaReplyReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaReplyReference +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaResumeEngineRequest: Request for -// resuming training of an engine. -type GoogleCloudDiscoveryengineV1betaResumeEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and -// layout of a type of document data. -type GoogleCloudDiscoveryengineV1betaSchema struct { - // JsonSchema: The JSON representation of the schema. - JsonSchema string `json:"jsonSchema,omitempty"` - - // Name: Immutable. The full resource name of the schema, in the format - // of - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 - // encoded string with a length limit of 1024 characters. - Name string `json:"name,omitempty"` - - // StructSchema: The structured representation of the schema. - StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest +// : Request message for +// CompletionService.ImportSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest struct { + // GcsSource: Cloud Storage location for the input content. Only 1 file + // can be specified that contains all entries to import. Supported + // values `gcs_source.schema` for autocomplete suggestion deny list + // entry imports: * `suggestion_deny_list` (default): One JSON + // [SuggestionDenyListEntry] per line. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // InlineSource: The Inline source for the input content for suggestion + // deny list entries. + InlineSource *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource `json:"inlineSource,omitempty"` - // ForceSendFields is a list of field names (e.g. "JsonSchema") to + // ForceSendFields is a list of field names (e.g. "GcsSource") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9352,7 +10444,7 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "JsonSchema") to include in + // NullFields is a list of field names (e.g. "GcsSource") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9361,40 +10453,20 @@ type GoogleCloudDiscoveryengineV1betaSchema struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSchema +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchInfo: Detailed search -// information. -type GoogleCloudDiscoveryengineV1betaSearchInfo struct { - // Offset: An integer that specifies the current offset for pagination - // (the 0-indexed starting location, amongst the products deemed by the - // API as relevant). See SearchRequest.offset for definition. If this - // field is negative, an `INVALID_ARGUMENT` is returned. This can only - // be set for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - Offset int64 `json:"offset,omitempty"` - - // OrderBy: The order in which products are returned, if applicable. See - // SearchRequest.order_by for definition and syntax. The value must be a - // UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be - // set for `search` events. Other event types should not set this field. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - OrderBy string `json:"orderBy,omitempty"` - - // SearchQuery: The user's search query. See SearchRequest.query for - // definition. The value must be a UTF-8 encoded string with a length - // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is - // returned. At least one of search_query or PageInfo.page_category is - // required for `search` events. Other event types should not set this - // field. Otherwise, an `INVALID_ARGUMENT` error is returned. - SearchQuery string `json:"searchQuery,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest +// InlineSource: The inline source for SuggestionDenyListEntry. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource struct { + // Entries: Required. A list of all denylist entries to import. Max of + // 1000 items. + Entries []*GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry `json:"entries,omitempty"` - // ForceSendFields is a list of field names (e.g. "Offset") to + // ForceSendFields is a list of field names (e.g. "Entries") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9402,8 +10474,8 @@ type GoogleCloudDiscoveryengineV1betaSearchInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Offset") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Entries") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9411,179 +10483,70 @@ type GoogleCloudDiscoveryengineV1betaSearchInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchInfo +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1betaSearchRequest struct { - // BoostSpec: Boost specification to boost certain documents. For more - // information on boosting, see Boosting - // (https://cloud.google.com/retail/docs/boosting#boost) - BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` - - // Branch: The branch resource name, such as - // `projects/*/locations/global/collections/default_collection/dataStores - // /default_data_store/branches/0`. Use `default_branch` as the branch - // ID or leave this field empty, to search documents under the default - // branch. - Branch string `json:"branch,omitempty"` - - // CanonicalFilter: The default filter that is applied when a user - // performs a search without checking any filters on the search page. - // The filter applied to every search request when quality improvement - // such as query expansion is needed. In the case a query does not have - // a sufficient amount of results this filter will be used to determine - // whether or not to enable the query expansion flow. The original - // filter will still be used for the query expanded search. This field - // is strongly recommended to achieve high search quality. For more - // information about filter syntax, see SearchRequest.filter. - CanonicalFilter string `json:"canonicalFilter,omitempty"` - - // ContentSearchSpec: A specification for configuring the behavior of - // content search. - ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - - // DataStoreSpecs: A list of data store specs to apply on a search call. - DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` - - // EmbeddingSpec: Uses the provided embedding to do additional semantic - // document retrieval. The retrieval is based on the dot product of - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document - // embedding that is provided in - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not - // provided, it will use ServingConfig.EmbeddingConfig.field_path. - EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` - - // FacetSpecs: Facet specifications for faceted search. If empty, no - // facets are returned. A maximum of 100 values are allowed. Otherwise, - // an `INVALID_ARGUMENT` error is returned. - FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` - - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. Filter expression is case-sensitive. If this field is - // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in - // Vertex AI Search is done by mapping the LHS filter key to a key - // property defined in the Vertex AI Search backend -- this mapping is - // defined by the customer in their schema. For example a media customer - // might have a field 'name' in their schema. In this case the filter - // would look like this: filter --> name:'ANY("king kong")' For more - // information about filtering including syntax and filter operators, - // see Filter - // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) - Filter string `json:"filter,omitempty"` - - // ImageQuery: Raw image query. - ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` - - // Offset: A 0-indexed integer that specifies the current offset (that - // is, starting result location, amongst the Documents deemed by the API - // as relevant) in search results. This field is only considered if - // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` - // is returned. - Offset int64 `json:"offset,omitempty"` - - // OrderBy: The order in which documents are returned. Documents can be - // ordered by a field in an Document object. Leave it unset if ordered - // by relevance. `order_by` expression is case-sensitive. For more - // information on ordering, see Ordering - // (https://cloud.google.com/retail/docs/filter-and-order#order) If this - // field is unrecognizable, an `INVALID_ARGUMENT` is returned. - OrderBy string `json:"orderBy,omitempty"` - - // PageSize: Maximum number of Documents to return. If unspecified, - // defaults to a reasonable value. The maximum allowed value is 100. - // Values above 100 are coerced to 100. If this field is negative, an - // `INVALID_ARGUMENT` is returned. - PageSize int64 `json:"pageSize,omitempty"` - - // PageToken: A page token received from a previous SearchService.Search - // call. Provide this to retrieve the subsequent page. When paginating, - // all other parameters provided to SearchService.Search must match the - // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` - // error is returned. - PageToken string `json:"pageToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRespons +// e: Response message for +// CompletionService.ImportSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // Params: Additional search parameters. For public website search only, - // supported values are: * `user_country_code`: string. Default empty. - // If set to non-empty, results are restricted or boosted based on the - // location provided. Example: user_country_code: "au" For available - // codes see Country Codes - // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) - // * `search_type`: double. Default empty. Enables non-webpage searching - // depending on the value. The only valid non-default value is 1, which - // enables image searching. Example: search_type: 1 - Params googleapi.RawMessage `json:"params,omitempty"` + // FailedEntriesCount: Count of deny list entries that failed to be + // imported. + FailedEntriesCount int64 `json:"failedEntriesCount,omitempty,string"` - // Query: Raw search query. - Query string `json:"query,omitempty"` + // ImportedEntriesCount: Count of deny list entries successfully + // imported. + ImportedEntriesCount int64 `json:"importedEntriesCount,omitempty,string"` - // QueryExpansionSpec: The query expansion specification that specifies - // the conditions under which query expansion occurs. - QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // RankingExpression: The ranking expression controls the customized - // ranking on retrieval documents. This overrides - // ServingConfig.ranking_expression. The ranking expression is a single - // function or multiple functions that are joint by "+". * - // ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: - // `relevance_score`: pre-defined keywords, used for measure relevance - // between query and document. `embedding_field_path`: the document - // embedding field used with query embedding vector. `dotProduct`: - // embedding function between embedding_field_path and query embedding - // vector. Example ranking expression: If document has an embedding - // field doc_embedding, the ranking expression could be `0.5 * - // relevance_score + 0.3 * dotProduct(doc_embedding)`. - RankingExpression string `json:"rankingExpression,omitempty"` + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // SafeSearch: Whether to turn on safe search. This is only supported - // for website search. - SafeSearch bool `json:"safeSearch,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // SpellCorrectionSpec: The spell correction specification that - // specifies the mode under which spell correction takes effect. - SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata: Metadata +// related to the progress of the Import operation. This is returned by +// the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // UserInfo: Information about the end user. Highly recommended for - // analytics. UserInfo.user_agent is used to deduce `device_type` for - // analytics. - UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // FailureCount: Count of entries that encountered errors while + // processing. + FailureCount int64 `json:"failureCount,omitempty,string"` - // 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"` + // SuccessCount: Count of entries that were processed successfully. + SuccessCount int64 `json:"successCount,omitempty,string"` - // UserPseudoId: A unique identifier for tracking visitors. For example, - // this could be implemented with an HTTP cookie, which should be able - // to uniquely identify a visitor on a single device. This unique - // identifier should not change if the visitor logs in or out of the - // website. This field should NOT have a fixed value such as - // `unknown_visitor`. This should be the same identifier as - // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserPseudoId string `json:"userPseudoId,omitempty"` + // 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. "BoostSpec") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9591,7 +10554,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostSpec") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9600,30 +10563,37 @@ type GoogleCloudDiscoveryengineV1betaSearchRequest struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost -// specification to boost certain documents. -type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { - // ConditionBoostSpecs: Condition boost specifications. If a document - // matches multiple conditions in the specifictions, boost scores from - // these specifications are all applied and combined in a non-linear - // way. Maximum number of specifications is 20. - ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequest: Request +// message for the ImportUserEvents request. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequest struct { + // BigquerySource: BigQuery input source. + BigquerySource *GoogleCloudDiscoveryengineV1betaBigQuerySource `json:"bigquerySource,omitempty"` - // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") - // to unconditionally include in API requests. By default, fields with + // ErrorConfig: The desired location of errors incurred during the + // Import. Cannot be set for inline user event imports. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // GcsSource: Cloud Storage location for the input content. + GcsSource *GoogleCloudDiscoveryengineV1betaGcsSource `json:"gcsSource,omitempty"` + + // InlineSource: The Inline source for the input content for UserEvents. + InlineSource *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource `json:"inlineSource,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BigquerySource") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to + // NullFields is a list of field names (e.g. "BigquerySource") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -9633,42 +10603,20 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSp -// ec: Boost applies to documents which match a condition. -type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { - // Boost: Strength of the condition boost, which should be in [-1, 1]. - // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives - // the document a big promotion. However, it does not necessarily mean - // that the boosted document will be the top result at all times, nor - // that other documents will be excluded. Results could still be shown - // even when none of them matches the condition. And results that are - // significantly more relevant to the search query can still trump your - // heavily favored but irrelevant documents. Setting to -1.0 gives the - // document a big demotion. However, results that are deeply relevant - // might still be shown. The document will have an upstream battle to - // get a fairly high ranking, but it is not blocked out completely. - // Setting to 0.0 means no boost applied. The boosting condition is - // ignored. Only one of the (condition, boost) combination or the - // boost_control_spec below are set. If both are set then the global - // boost is ignored and the more fine-grained boost_control_spec is - // applied. - Boost float64 `json:"boost,omitempty"` - - // Condition: An expression which specifies a boost condition. The - // syntax and supported fields are the same as a filter expression. See - // SearchRequest.filter for detail syntax and limitations. Examples: * - // To boost documents with document ID "doc_1" or "doc_2", and color - // "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: - // ANY("Red", "Blue"))` - Condition string `json:"condition,omitempty"` +// GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource: +// The inline source for the input config for ImportUserEvents method. +type GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource struct { + // UserEvents: Required. A list of user events to import. Recommended + // max of 10k items. + UserEvents []*GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvents,omitempty"` - // ForceSendFields is a list of field names (e.g. "Boost") to + // ForceSendFields is a list of field names (e.g. "UserEvents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9676,8 +10624,8 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec st // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "UserEvents") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -9685,152 +10633,130 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec st NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsRequestInlineSource raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec - var s1 struct { - Boost gensupport.JSONFloat64 `json:"boost"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Boost = float64(s1.Boost) - return nil -} +// GoogleCloudDiscoveryengineV1betaImportUserEventsResponse: Response of +// the ImportUserEventsRequest. If the long running operation was +// successful, then this message is returned by the +// google.longrunning.Operations.response field if the operation was +// successful. +type GoogleCloudDiscoveryengineV1betaImportUserEventsResponse struct { + // ErrorConfig: Echoes the destination for the complete errors if this + // field was set in the request. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A -// specification for configuring the behavior of content search. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { - // ExtractiveContentSpec: If there is no extractive_content_spec - // provided, there will be no extractive answer in the search response. - ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // SnippetSpec: If `snippetSpec` is not specified, snippets are not - // included in the search response. - SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // JoinedEventsCount: Count of user events imported with complete + // existing Documents. + JoinedEventsCount int64 `json:"joinedEventsCount,omitempty,string"` - // SummarySpec: If `summarySpec` is not specified, summaries are not - // included in the search response. - SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // UnjoinedEventsCount: Count of user events imported, but with Document + // information not found in the existing Branch. + UnjoinedEventsCount int64 `json:"unjoinedEventsCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. - // "ExtractiveContentSpec") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExtractiveContentSpec") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec +func (s *GoogleCloudDiscoveryengineV1betaImportUserEventsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaImportUserEventsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtracti -// veContentSpec: A specification for configuring the extractive content -// in a search response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { - // MaxExtractiveAnswerCount: The maximum number of extractive answers - // returned in each search result. An extractive answer is a verbatim - // answer extracted from the original document, which provides a precise - // and contextually relevant answer to the search query. If the number - // of matching answers is less than the `max_extractive_answer_count`, - // return all of the answers. Otherwise, return the - // `max_extractive_answer_count`. At most five answers are returned for - // each SearchResult. - MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` - - // MaxExtractiveSegmentCount: The max number of extractive segments - // returned in each search result. Only applied if the DataStore is set - // to DataStore.ContentConfig.CONTENT_REQUIRED or - // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment - // is a text segment extracted from the original document that is - // relevant to the search query, and, in general, more verbose than an - // extractive answer. The segment could then be used as input for LLMs - // to generate summaries and answers. If the number of matching segments - // is less than `max_extractive_segment_count`, return all of the - // segments. Otherwise, return the `max_extractive_segment_count`. - MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` +// GoogleCloudDiscoveryengineV1betaInterval: A floating point interval. +type GoogleCloudDiscoveryengineV1betaInterval struct { + // ExclusiveMaximum: Exclusive upper bound. + ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` - // NumNextSegments: Return at most `num_next_segments` segments after - // each selected segments. - NumNextSegments int64 `json:"numNextSegments,omitempty"` + // ExclusiveMinimum: Exclusive lower bound. + ExclusiveMinimum float64 `json:"exclusiveMinimum,omitempty"` - // NumPreviousSegments: Specifies whether to also include the adjacent - // from each selected segments. Return at most `num_previous_segments` - // segments before each selected segments. - NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` + // Maximum: Inclusive upper bound. + Maximum float64 `json:"maximum,omitempty"` - // ReturnExtractiveSegmentScore: Specifies whether to return the - // confidence score from the extractive segments in each search result. - // This feature is available only for new or allowlisted data stores. To - // allowlist your data store, please contact your Customer Engineer. The - // default value is `false`. - ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` + // Minimum: Inclusive lower bound. + Minimum float64 `json:"minimum,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "MaxExtractiveAnswerCount") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. + // ForceSendFields is a list of field names (e.g. "ExclusiveMaximum") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the + // NullFields is a list of field names (e.g. "ExclusiveMaximum") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the // server as null. It is an error if a field in this list has a // non-empty value. This may be used to include null fields in Patch // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec +func (s *GoogleCloudDiscoveryengineV1betaInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetS -// pec: A specification for configuring snippets in a search response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { - // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control - // snippet return, use `return_snippet` field. For backwards - // compatibility, we will return snippet if max_snippet_count > 0. - MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaInterval) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaInterval + var s1 struct { + ExclusiveMaximum gensupport.JSONFloat64 `json:"exclusiveMaximum"` + ExclusiveMinimum gensupport.JSONFloat64 `json:"exclusiveMinimum"` + Maximum gensupport.JSONFloat64 `json:"maximum"` + Minimum gensupport.JSONFloat64 `json:"minimum"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExclusiveMaximum = float64(s1.ExclusiveMaximum) + s.ExclusiveMinimum = float64(s1.ExclusiveMinimum) + s.Maximum = float64(s1.Maximum) + s.Minimum = float64(s1.Minimum) + return nil +} - // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no - // affect on the snippet. - ReferenceOnly bool `json:"referenceOnly,omitempty"` +// GoogleCloudDiscoveryengineV1betaListConversationsResponse: Response +// for ListConversations method. +type GoogleCloudDiscoveryengineV1betaListConversationsResponse struct { + // Conversations: All the Conversations for a given data store. + Conversations []*GoogleCloudDiscoveryengineV1betaConversation `json:"conversations,omitempty"` - // ReturnSnippet: If `true`, then return snippet. If no snippet can be - // generated, we return "No snippet is available for this page." A - // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also - // be returned. - ReturnSnippet bool `json:"returnSnippet,omitempty"` + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Conversations") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9838,123 +10764,75 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MaxSnippetCount") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Conversations") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec +func (s *GoogleCloudDiscoveryengineV1betaListConversationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListConversationsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS -// pec: A specification for configuring a summary returned in a search -// response. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { - // IgnoreAdversarialQuery: Specifies whether to filter out adversarial - // queries. The default value is `false`. Google employs search-query - // classification to detect adversarial queries. No summary is returned - // if the search query is classified as an adversarial query. For - // example, a user might ask a question regarding negative comments - // about the company or submit a query designed to generate unsafe, - // policy-violating output. If this field is set to `true`, we skip - // generating summaries for adversarial queries and return fallback - // messages instead. - IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` +// GoogleCloudDiscoveryengineV1betaListDataStoresResponse: Response +// message for DataStoreService.ListDataStores method. +type GoogleCloudDiscoveryengineV1betaListDataStoresResponse struct { + // DataStores: All the customer's DataStores. + DataStores []*GoogleCloudDiscoveryengineV1betaDataStore `json:"dataStores,omitempty"` - // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries - // that are not summary-seeking. The default value is `false`. Google - // employs search-query classification to detect summary-seeking - // queries. No summary is returned if the search query is classified as - // a non-summary seeking query. For example, `why is the sky blue` and - // `Who is the best soccer player in the world?` are summary-seeking - // queries, but `SFO airport` and `world cup 2026` are not. They are - // most likely navigational queries. If this field is set to `true`, we - // skip generating summaries for non-summary seeking queries and return - // fallback messages instead. - IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - - // IncludeCitations: Specifies whether to include citations in the - // summary. The default value is `false`. When this field is set to - // `true`, summaries include in-line citation numbers. Example summary - // including citations: BigQuery is Google Cloud's fully managed and - // completely serverless enterprise data warehouse [1]. BigQuery - // supports all data types, works across clouds, and has built-in - // machine learning and business intelligence, all within a unified - // platform [2, 3]. The citation numbers refer to the returned search - // results and are 1-indexed. For example, [1] means that the sentence - // is attributed to the first search result. [2, 3] means that the - // sentence is attributed to both the second and third search results. - IncludeCitations bool `json:"includeCitations,omitempty"` - - // LanguageCode: Language code for Summary. Use language tags defined by - // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is - // an experimental feature. - LanguageCode string `json:"languageCode,omitempty"` - - // ModelPromptSpec: If specified, the spec will be used to modify the - // prompt provided to the LLM. - ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` - - // ModelSpec: If specified, the spec will be used to modify the model - // specification provided to the LLM. - ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` - - // SummaryResultCount: The number of top results to generate the summary - // from. If the number of results returned is less than - // `summaryResultCount`, the summary is generated from all of the - // results. At most 10 results can be used to generate a summary. - SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // NextPageToken: A token that can be sent as + // ListDataStoresRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // UseSemanticChunks: If true, answer will be generated from most - // relevant chunks from top search results. This feature will improve - // summary quality. Please note that with this feature enabled, not all - // top search results will be referenced and included in the reference - // list, so the citation source index only points to the search results - // listed in the reference list. - UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "IgnoreAdversarialQuery") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. However, any non-pointer, non-interface field appearing in - // ForceSendFields will be sent to the server regardless of whether the - // field is empty or not. This may be used to include empty fields in - // Patch requests. + // ForceSendFields is a list of field names (e.g. "DataStores") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") - // to include in API requests with the JSON null value. By default, - // fields with empty values are omitted from API requests. However, any - // field with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "DataStores") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec +func (s *GoogleCloudDiscoveryengineV1betaListDataStoresResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListDataStoresResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS -// pecModelPromptSpec: Specification of the prompt to use with the -// model. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { - // Preamble: Text at the beginning of the prompt that instructs the - // assistant. Examples are available in the user guide. - Preamble string `json:"preamble,omitempty"` +// GoogleCloudDiscoveryengineV1betaListDocumentsResponse: Response +// message for DocumentService.ListDocuments method. +type GoogleCloudDiscoveryengineV1betaListDocumentsResponse struct { + // Documents: The Documents. + Documents []*GoogleCloudDiscoveryengineV1betaDocument `json:"documents,omitempty"` - // ForceSendFields is a list of field names (e.g. "Preamble") to + // NextPageToken: A token that can be sent as + // ListDocumentsRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Documents") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9962,7 +10840,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMo // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Preamble") to include in + // NullFields is a list of field names (e.g. "Documents") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -9971,26 +10849,26 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMo NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec +func (s *GoogleCloudDiscoveryengineV1betaListDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS -// pecModelSpec: Specification of the model. -type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { - // Version: The model version used to generate the summary. Supported - // values are: * `stable`: string. Default value when no value is - // specified. Uses a generally available, fine-tuned model. For more - // information, see Answer generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). - // * `preview`: string. (Public preview) Uses a preview model. For more - // information, see Answer generation model versions and lifecycle - // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). - Version string `json:"version,omitempty"` +// GoogleCloudDiscoveryengineV1betaListEnginesResponse: Response message +// for EngineService.ListEngines method. +type GoogleCloudDiscoveryengineV1betaListEnginesResponse struct { + // Engines: All the customer's Engines. + Engines []*GoogleCloudDiscoveryengineV1betaEngine `json:"engines,omitempty"` - // ForceSendFields is a list of field names (e.g. "Version") to + // NextPageToken: Not supported. + NextPageToken string `json:"nextPageToken,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Engines") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -9998,7 +10876,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMo // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Version") to include in + // NullFields is a list of field names (e.g. "Engines") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10007,21 +10885,28 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecMo NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec +func (s *GoogleCloudDiscoveryengineV1betaListEnginesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListEnginesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct -// to define data stores to filter on in a search call. -type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { - // DataStore: Required. Full resource name of DataStore, such as - // `projects/{project}/locations/{location}/collections/{collection_id}/d - // ataStores/{data_store_id}`. - DataStore string `json:"dataStore,omitempty"` +// GoogleCloudDiscoveryengineV1betaListSchemasResponse: Response message +// for SchemaService.ListSchemas method. +type GoogleCloudDiscoveryengineV1betaListSchemasResponse struct { + // NextPageToken: A token that can be sent as + // ListSchemasRequest.page_token to retrieve the next page. If this + // field is omitted, there are no subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // Schemas: The Schemas. + Schemas []*GoogleCloudDiscoveryengineV1betaSchema `json:"schemas,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10029,30 +10914,36 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec +func (s *GoogleCloudDiscoveryengineV1betaListSchemasResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSchemasResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The -// specification that uses customized query embedding vector to do -// semantic document retrieval. -type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { - // EmbeddingVectors: The embedding vector used for retrieval. Limit to - // 1. - EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` +// GoogleCloudDiscoveryengineV1betaListServingConfigsResponse: Response +// for ListServingConfigs method. +type GoogleCloudDiscoveryengineV1betaListServingConfigsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to + // ServingConfigs: All the ServingConfigs for a given dataStore. + ServingConfigs []*GoogleCloudDiscoveryengineV1betaServingConfig `json:"servingConfigs,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10060,32 +10951,36 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EmbeddingVectors") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec +func (s *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListServingConfigsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVec -// tor: Embedding vector. -type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { - // FieldPath: Embedding field path in schema. - FieldPath string `json:"fieldPath,omitempty"` +// GoogleCloudDiscoveryengineV1betaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1betaListSessionsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last + // page. + NextPageToken string `json:"nextPageToken,omitempty"` - // Vector: Query embedding vector. - Vector []float64 `json:"vector,omitempty"` + // Sessions: All the Sessions for a given data store. + Sessions []*GoogleCloudDiscoveryengineV1betaSession `json:"sessions,omitempty"` - // ForceSendFields is a list of field names (e.g. "FieldPath") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10093,94 +10988,81 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector s // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FieldPath") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector +func (s *GoogleCloudDiscoveryengineV1betaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListSessionsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector - var s1 struct { - Vector []gensupport.JSONFloat64 `json:"vector"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Vector = make([]float64, len(s1.Vector)) - for i := range s1.Vector { - s.Vector[i] = float64(s1.Vector[i]) - } - return nil -} +// GoogleCloudDiscoveryengineV1betaListTargetSitesResponse: Response +// message for SiteSearchEngineService.ListTargetSites method. +type GoogleCloudDiscoveryengineV1betaListTargetSitesResponse struct { + // NextPageToken: A token that can be sent as `page_token` to retrieve + // the next page. If this field is omitted, there are no subsequent + // pages. + NextPageToken string `json:"nextPageToken,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet -// specification to perform faceted search. -type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { - // EnableDynamicPosition: Enables dynamic position for this facet. If - // set to true, the position of this facet among all facets in the - // response is determined automatically. If dynamic facets are enabled, - // it is ordered together. If set to false, the position of this facet - // in the response is the same as in the request, and it is ranked - // before the facets with dynamic position enable and all dynamic - // facets. For example, you may always want to have rating facet - // returned in the response, but it's not necessarily to always display - // the rating facet at the top. In that case, you can set - // enable_dynamic_position to true so that the position of rating facet - // in response is determined automatically. Another example, assuming - // you have the following facets in the request: * "rating", - // enable_dynamic_position = true * "price", enable_dynamic_position = - // false * "brands", enable_dynamic_position = false And also you have a - // dynamic facets enabled, which generates a facet `gender`. Then the - // final order of the facets in the response can be ("price", "brands", - // "rating", "gender") or ("price", "brands", "gender", "rating") - // depends on how API orders "gender" and "rating" facets. However, - // notice that "price" and "brands" are always ranked at first and - // second position because their enable_dynamic_position is false. - EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` + // TargetSites: List of TargetSites. + TargetSites []*GoogleCloudDiscoveryengineV1betaTargetSite `json:"targetSites,omitempty"` - // ExcludedFilterKeys: List of keys to exclude when faceting. By - // default, FacetKey.key is not excluded from the filter unless it is - // listed in this field. Listing a facet key in this field allows its - // values to appear as facet results, even when they are filtered out of - // search results. Using this field does not affect what search results - // are returned. For example, suppose there are 100 documents with the - // color facet "Red" and 200 documents with the color facet "Blue". A - // query containing the filter "color:ANY("Red")" and having "color" as - // FacetKey.key would by default return only "Red" documents in the - // search results, and also return "Red" with count 100 as the only - // color facet. Although there are also blue documents available, "Blue" - // would not be shown as an available facet value. If "color" is listed - // in "excludedFilterKeys", then the query returns the facet values - // "Red" with count 100 and "Blue" with count 200, because the "color" - // key is now excluded from the filter. Because this field doesn't - // affect search results, the search results are still correctly - // filtered to return only "Red" documents. A maximum of 100 values are - // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. - ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` + // TotalSize: The total number of items matching the request. This will + // always be populated in the response. + TotalSize int64 `json:"totalSize,omitempty"` - // FacetKey: Required. The facet key specification. - FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // Limit: Maximum of facet values that should be returned for this - // facet. If unspecified, defaults to 20. The maximum allowed value is - // 300. Values above 300 are coerced to 300. If this field is negative, - // an `INVALID_ARGUMENT` is returned. - Limit int64 `json:"limit,omitempty"` + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaListTargetSitesResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaMediaInfo: Media-specific user event +// information. +type GoogleCloudDiscoveryengineV1betaMediaInfo struct { + // MediaProgressDuration: The media progress time in seconds, if + // applicable. For example, if the end user has finished 90 seconds of a + // playback video, then MediaInfo.media_progress_duration.seconds should + // be set to 90. + MediaProgressDuration string `json:"mediaProgressDuration,omitempty"` + + // MediaProgressPercentage: Media progress should be computed using only + // the media_progress_duration relative to the media total length. This + // value must be between `[0, 1.0]` inclusive. If this is not a playback + // or the progress cannot be computed (e.g. ongoing livestream), this + // field should be unset. + MediaProgressPercentage float64 `json:"mediaProgressPercentage,omitempty"` // ForceSendFields is a list of field names (e.g. - // "EnableDynamicPosition") to unconditionally include in API requests. + // "MediaProgressDuration") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -10188,7 +11070,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableDynamicPosition") to + // NullFields is a list of field names (e.g. "MediaProgressDuration") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -10198,62 +11080,62 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec +func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: -// Specifies how a facet is computed. -type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { - // CaseInsensitive: True to make facet keys case insensitive when - // getting faceting values with prefixes or contains; false otherwise. - CaseInsensitive bool `json:"caseInsensitive,omitempty"` - - // Contains: Only get facet values that contains the given strings. For - // example, suppose "category" has three values "Action > 2022", "Action - // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the - // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". - // Only supported on textual fields. Maximum is 10. - Contains []string `json:"contains,omitempty"` - - // Intervals: Set only if values should be bucketed into intervals. Must - // be set for facets with numerical values. Must not be set for facet - // with text values. Maximum number of intervals is 30. - Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaMediaInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaMediaInfo + var s1 struct { + MediaProgressPercentage gensupport.JSONFloat64 `json:"mediaProgressPercentage"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.MediaProgressPercentage = float64(s1.MediaProgressPercentage) + return nil +} - // Key: Required. Supported textual and numerical facet keys in Document - // object, over which the facet values are computed. Facet key is - // case-sensitive. - Key string `json:"key,omitempty"` +// GoogleCloudDiscoveryengineV1betaPageInfo: Detailed page information. +type GoogleCloudDiscoveryengineV1betaPageInfo struct { + // PageCategory: The most specific category associated with a category + // page. To represent full path of category, use '>' sign to separate + // different hierarchies. If '>' is part of the category name, please + // replace it with other character(s). Category pages include special + // pages such as sales or promotions. For instance, a special sale page + // may have the category hierarchy: "pageCategory" : "Sales > 2017 + // Black Friday Deals". Required for `view-category-page` events. Other + // event types should not set this field. Otherwise, an + // `INVALID_ARGUMENT` error is returned. + PageCategory string `json:"pageCategory,omitempty"` - // OrderBy: The order in which documents are returned. Allowed values - // are: * "count desc", which means order by - // SearchResponse.Facet.values.count descending. * "value desc", which - // means order by SearchResponse.Facet.values.value descending. Only - // applies to textual facets. If not set, textual values are sorted in - // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); - // numerical intervals are sorted in the order given by - // FacetSpec.FacetKey.intervals. - OrderBy string `json:"orderBy,omitempty"` + // PageviewId: A unique ID of a web page view. This should be kept the + // same for all user events triggered from the same pageview. For + // example, an item detail page view could trigger multiple events as + // the user is browsing the page. The `pageview_id` property should be + // kept the same for all these events so that they can be grouped + // together properly. When using the client side event reporting with + // JavaScript pixel and Google Tag Manager, this value is filled in + // automatically. + PageviewId string `json:"pageviewId,omitempty"` - // Prefixes: Only get facet values that start with the given string - // prefix. For example, suppose "category" has three values "Action > - // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to - // "Action", the "category" facet only contains "Action > 2022" and - // "Action > 2021". Only supported on textual fields. Maximum is 10. - Prefixes []string `json:"prefixes,omitempty"` + // ReferrerUri: The referrer URL of the current page. When using the + // client side event reporting with JavaScript pixel and Google Tag + // Manager, this value is filled in automatically. However, some browser + // privacy restrictions may cause this field to be empty. + ReferrerUri string `json:"referrerUri,omitempty"` - // RestrictedValues: Only get facet for the given restricted values. - // Only supported on textual fields. For example, suppose "category" has - // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If - // set "restricted_values" to "Action > 2022", the "category" facet only - // contains "Action > 2022". Only supported on textual fields. Maximum - // is 10. - RestrictedValues []string `json:"restrictedValues,omitempty"` + // Uri: Complete URL (window.location.href) of the user's current page. + // When using the client side event reporting with JavaScript pixel and + // Google Tag Manager, this value is filled in automatically. Maximum + // length 5,000 characters. + Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to + // ForceSendFields is a list of field names (e.g. "PageCategory") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10261,30 +11143,39 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CaseInsensitive") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "PageCategory") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey +func (s *GoogleCloudDiscoveryengineV1betaPageInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPageInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies -// the image query input. -type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { - // ImageBytes: Base64 encoded image bytes. Supported image formats: - // JPEG, PNG, and BMP. - ImageBytes string `json:"imageBytes,omitempty"` +// GoogleCloudDiscoveryengineV1betaPanelInfo: Detailed panel information +// associated with a user event. +type GoogleCloudDiscoveryengineV1betaPanelInfo struct { + // DisplayName: The display name of the panel. + DisplayName string `json:"displayName,omitempty"` - // ForceSendFields is a list of field names (e.g. "ImageBytes") to + // PanelId: Required. The panel ID. + PanelId string `json:"panelId,omitempty"` + + // PanelPosition: The ordered position of the panel, if shown to the + // user with other panels. If set, then total_panels must also be set. + PanelPosition int64 `json:"panelPosition,omitempty"` + + // TotalPanels: The total number of panels, including this one, shown to + // the user. Must be set if panel_position is set. + TotalPanels int64 `json:"totalPanels,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10292,42 +11183,49 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ImageBytes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DisplayName") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery +func (s *GoogleCloudDiscoveryengineV1betaPanelInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPanelInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: -// Specification to determine under which conditions query expansion -// should occur. -type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { - // Condition: The condition under which query expansion should occur. - // Default to Condition.DISABLED. - // - // Possible values: - // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In - // this case, server behavior defaults to Condition.DISABLED. - // "DISABLED" - Disabled query expansion. Only the exact search query - // is used, even if SearchResponse.total_size is zero. - // "AUTO" - Automatic query expansion built by the Search API. - Condition string `json:"condition,omitempty"` +// GoogleCloudDiscoveryengineV1betaPauseEngineRequest: Request for +// pausing training of an engine. +type GoogleCloudDiscoveryengineV1betaPauseEngineRequest struct { +} - // PinUnexpandedResults: Whether to pin unexpanded results. If this - // field is set to true, unexpanded products are always at the top of - // the search results, followed by the expanded results. - PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` +// 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"` - // ForceSendFields is a list of field names (e.g. "Condition") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10335,7 +11233,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10344,29 +11242,24 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The -// specification for query spell correction. -type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { - // Mode: The mode under which spell correction should take effect to - // replace the original search query. Default to Mode.AUTO. - // - // Possible values: - // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this - // case, server behavior defaults to Mode.AUTO. - // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion - // if there is any and put in the SearchResponse.corrected_query. The - // spell suggestion will not be used as the search query. - // "AUTO" - Automatic spell correction built by the Search API. Search - // will be based on the corrected query if found. - Mode string `json:"mode,omitempty"` +// GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest: Request +// message for DocumentService.PurgeDocuments method. +type GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest struct { + // Filter: Required. Filter matching documents to purge. Only currently + // supported value is `*` (all items). + Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "Mode") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10374,7 +11267,7 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Mode") to include in API + // NullFields is a list of field names (e.g. "Filter") to include in API // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10383,68 +11276,27 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponse: Response message for -// SearchService.Search method. -type GoogleCloudDiscoveryengineV1betaSearchResponse struct { - // AppliedControls: Controls applied as part of the Control service. - AppliedControls []string `json:"appliedControls,omitempty"` - - // AttributionToken: A unique search token. This should be included in - // the UserEvent logs resulting from this search, which enables accurate - // attribution of search model performance. - AttributionToken string `json:"attributionToken,omitempty"` - - // CorrectedQuery: Contains the spell corrected query, if found. If the - // spell correction type is AUTOMATIC, then the search results are based - // on corrected_query. Otherwise the original query is used for search. - CorrectedQuery string `json:"correctedQuery,omitempty"` - - // Facets: Results of facets requested by user. - Facets []*GoogleCloudDiscoveryengineV1betaSearchResponseFacet `json:"facets,omitempty"` - - GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` - - // GuidedSearchResult: Guided search result. - GuidedSearchResult *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - - // NextPageToken: A token that can be sent as SearchRequest.page_token - // to retrieve the next page. If this field is omitted, there are no - // subsequent pages. - NextPageToken string `json:"nextPageToken,omitempty"` - - // QueryExpansionInfo: Query expansion information for the returned - // results. - QueryExpansionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` - - // RedirectUri: The URI of a customer-defined redirect page. If redirect - // action is triggered, no search is performed, and only redirect_uri - // and attribution_token are set in the response. - RedirectUri string `json:"redirectUri,omitempty"` - - // Results: A list of matched documents. The order represents the - // ranking. - Results []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"results,omitempty"` - - // Summary: A summary as part of the search results. This field is only - // returned if SearchRequest.ContentSearchSpec.summary_spec is set. - Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` - - // TotalSize: The estimated total count of matched items irrespective of - // pagination. The count of results returned by pagination may be less - // than the total_size that matches. - TotalSize int64 `json:"totalSize,omitempty"` +// 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"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // 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. "AppliedControls") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10452,35 +11304,34 @@ type GoogleCloudDiscoveryengineV1betaSearchResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AppliedControls") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "PurgeCount") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponse +func (s *GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeDocumentsResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseFacet: A facet result. -type GoogleCloudDiscoveryengineV1betaSearchResponseFacet struct { - // DynamicFacet: Whether the facet is dynamically generated. - DynamicFacet bool `json:"dynamicFacet,omitempty"` - - // Key: The key for this facet. E.g., "colors" or "price". It matches - // SearchRequest.FacetSpec.FacetKey.key. - Key string `json:"key,omitempty"` +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata +// : Metadata related to the progress of the +// PurgeSuggestionDenyListEntries operation. This is returned by the +// google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` - // Values: The facet values for this field. - Values []*GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue `json:"values,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. "DynamicFacet") to + // ForceSendFields is a list of field names (e.g. "CreateTime") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10488,35 +11339,41 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseFacet struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DynamicFacet") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseFacet) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacet +func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesMetadata raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue: A -// facet value which contains value names and their count. -type GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue struct { - // Count: Number of items that have this facet value. - Count int64 `json:"count,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest: +// +// Request message for CompletionService.PurgeSuggestionDenyListEntries +// +// method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest struct { +} - // Interval: Interval value for a facet, such as 10, 20) for facet - // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. - Interval *GoogleCloudDiscoveryengineV1betaInterval `json:"interval,omitempty"` +// GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse +// : Response message for +// CompletionService.PurgeSuggestionDenyListEntries method. +type GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse struct { + // ErrorSamples: A sample of errors encountered while processing the + // request. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` - // Value: Text value of a facet, such as "Black" for facet "colors". - Value string `json:"value,omitempty"` + // PurgeCount: Number of suggestion deny list entries purged. + PurgeCount int64 `json:"purgeCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "Count") to + // ForceSendFields is a list of field names (e.g. "ErrorSamples") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10524,33 +11381,30 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Count") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorSamples") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue +func (s *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo: -// Debug information specifically related to forward geocoding issues -// arising from Geolocation Search. -type GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo struct { - // ErrorMessage: The error produced. - ErrorMessage string `json:"errorMessage,omitempty"` +// GoogleCloudDiscoveryengineV1betaQuery: Defines a user inputed query. +type GoogleCloudDiscoveryengineV1betaQuery struct { + // QueryId: Unique Id for the query. + QueryId string `json:"queryId,omitempty"` - // OriginalAddressQuery: The address from which forward geocoding - // ingestion produced issues. - OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` + // Text: Plain text. + Text string `json:"text,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorMessage") to + // ForceSendFields is a list of field names (e.g. "QueryId") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10558,68 +11412,82 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorMessage") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "QueryId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo +func (s *GoogleCloudDiscoveryengineV1betaQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult: -// Guided search result. The guided search helps user to refine the -// search results and narrow down to the real needs from a broaded -// search results. -type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult struct { - // FollowUpQuestions: Suggested follow-up questions. - FollowUpQuestions []string `json:"followUpQuestions,omitempty"` +// GoogleCloudDiscoveryengineV1betaRankRequest: Request message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankRequest struct { + // IgnoreRecordDetailsInResponse: If true, the response will contain + // only record ID and score. By default, it is false, the response will + // contain record details. + IgnoreRecordDetailsInResponse bool `json:"ignoreRecordDetailsInResponse,omitempty"` - // RefinementAttributes: A list of ranked refinement attributes. - RefinementAttributes []*GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` + // Model: The identifier of the model to use. It is one of: * + // `semantic-ranker-512@latest`: Semantic ranking model with maxiumn + // input token size 512. It is set to `semantic-ranker-512@latest` by + // default if unspecified. + Model string `json:"model,omitempty"` - // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") - // to unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // Query: The query to use. + Query string `json:"query,omitempty"` + + // Records: Required. A list of records to rank. At most 100 records to + // rank. + Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` + + // TopN: The number of results to return. If this is unset or no bigger + // than zero, returns all results. + TopN int64 `json:"topN,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "IgnoreRecordDetailsInResponse") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FollowUpQuestions") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. + // "IgnoreRecordDetailsInResponse") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult +func (s *GoogleCloudDiscoveryengineV1betaRankRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefine -// mentAttribute: Useful attribute for search result refinements. -type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute struct { - // AttributeKey: Attribute key used to refine the results e.g. - // 'movie_type'. - AttributeKey string `json:"attributeKey,omitempty"` +// GoogleCloudDiscoveryengineV1betaRankResponse: Response message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankResponse struct { + // Records: A list of records sorted by descending score. + Records []*GoogleCloudDiscoveryengineV1betaRankingRecord `json:"records,omitempty"` - // AttributeValue: Attribute value used to refine the results e.g. - // 'drama'. - AttributeValue string `json:"attributeValue,omitempty"` + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AttributeKey") to + // ForceSendFields is a list of field names (e.g. "Records") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10627,35 +11495,42 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementA // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AttributeKey") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Records") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute +func (s *GoogleCloudDiscoveryengineV1betaRankResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo: -// Information describing query expansion including whether expansion -// has occurred. -type GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo struct { - // ExpandedQuery: Bool describing whether query expansion has occurred. - ExpandedQuery bool `json:"expandedQuery,omitempty"` +// GoogleCloudDiscoveryengineV1betaRankingRecord: Record message for +// RankService.Rank method. +type GoogleCloudDiscoveryengineV1betaRankingRecord struct { + // Content: The content of the record. Empty by default. At least one of + // title or content should be set otherwise an INVALID_ARGUMENT error is + // thrown. + Content string `json:"content,omitempty"` - // PinnedResultCount: Number of pinned results. This field will only be - // set when expansion happens and - // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to - // true. - PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` + // Id: The unique ID to represent the record. + Id string `json:"id,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to + // Score: The score of this record based on the given query and selected + // model. + Score float64 `json:"score,omitempty"` + + // Title: The title of the record. Empty by default. At least one of + // title or content should be set otherwise an INVALID_ARGUMENT error is + // thrown. + Title string `json:"title,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10663,35 +11538,118 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExpandedQuery") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo +func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult: -// Represents the search results. -type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { - // Document: The document data snippet in the search response. Only - // fields that are marked as retrievable are populated. - Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaRankingRecord) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaRankingRecord + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} - // Id: Document.id of the searched Document. - Id string `json:"id,omitempty"` +// GoogleCloudDiscoveryengineV1betaRecommendRequest: Request message for +// Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendRequest struct { + // Filter: Filter for restricting recommendation results with a length + // limit of 5,000 characters. Currently, only filter expressions on the + // `filter_tags` attribute is supported. Examples: * `(filter_tags: + // ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))` * + // `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: + // ANY("Green"))` If `attributeFilteringSyntax` is set to true under the + // `params` field, then attribute-based expressions are expected instead + // of the above described tag-based syntax. Examples: * (launguage: + // ANY("en", "es")) AND NOT (categories: ANY("Movie")) * (available: + // true) AND (launguage: ANY("en", "es")) OR (categories: ANY("Movie")) + // If your filter blocks all results, the API will return generic + // (unfiltered) popular Documents. If you only want results strictly + // matching the filters, set `strictFiltering` to True in + // RecommendRequest.params to receive empty results instead. Note that + // the API will never return Documents with `storageStatus` of `EXPIRED` + // or `DELETED` regardless of filter choices. + Filter string `json:"filter,omitempty"` - // ModelScores: Google provided available scores. - ModelScores map[string]GoogleCloudDiscoveryengineV1betaDoubleList `json:"modelScores,omitempty"` + // PageSize: Maximum number of results to return. Set this property to + // the number of recommendation results needed. If zero, the service + // will choose a reasonable default. The maximum allowed value is 100. + // Values above 100 will be coerced to 100. + PageSize int64 `json:"pageSize,omitempty"` - // ForceSendFields is a list of field names (e.g. "Document") to + // Params: Additional domain specific parameters for the + // recommendations. Allowed values: * `returnDocument`: Boolean. If set + // to true, the associated Document object will be returned in + // RecommendResponse.RecommendationResult.document. * `returnScore`: + // Boolean. If set to true, the recommendation 'score' corresponding to + // each returned Document will be set in + // RecommendResponse.RecommendationResult.metadata. The given 'score' + // indicates the probability of a Document conversion given the user's + // context and history. * `strictFiltering`: Boolean. True by default. + // If set to false, the service will return generic (unfiltered) popular + // Documents instead of empty if your filter blocks all recommendation + // results. * `diversityLevel`: String. Default empty. If set to be + // non-empty, then it needs to be one of: * `no-diversity` * + // `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` This gives request-level control and adjusts + // recommendation results based on Document category. * + // `attributeFilteringSyntax`: Boolean. False by default. If set to + // true, the `filter` field is interpreted according to the new, + // attribute-based syntax. + Params googleapi.RawMessage `json:"params,omitempty"` + + // UserEvent: Required. Context about the user, what they are looking at + // and what action they took to trigger the Recommend request. Note that + // this user event detail won't be ingested to userEvent logs. Thus, a + // separate userEvent write request is required for event logging. Don't + // set UserEvent.user_pseudo_id or UserEvent.user_info.user_id to the + // same fixed ID for different users. If you are trying to receive + // non-personalized recommendations (not recommended; this can + // negatively impact model performance), instead set + // UserEvent.user_pseudo_id to a random unique ID and leave + // UserEvent.user_info.user_id unset. + UserEvent *GoogleCloudDiscoveryengineV1betaUserEvent `json:"userEvent,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Requirements for + // labels + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // ValidateOnly: Use validate only mode for this recommendation query. + // If set to true, a fake model will be used that returns arbitrary + // Document IDs. Note that the validate only mode should only be used + // for testing the API, or if the model is not ready. + ValidateOnly bool `json:"validateOnly,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Filter") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10699,8 +11657,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Document") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10708,50 +11666,36 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult +func (s *GoogleCloudDiscoveryengineV1betaRecommendRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the -// top N search result specified by the summary spec. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { - // SafetyAttributes: A collection of Safety Attribute categories and - // their associated confidence scores. - SafetyAttributes *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` +// GoogleCloudDiscoveryengineV1betaRecommendResponse: Response message +// for Recommend method. +type GoogleCloudDiscoveryengineV1betaRecommendResponse struct { + // AttributionToken: A unique attribution token. This should be included + // in the UserEvent logs resulting from this recommendation, which + // enables accurate attribution of recommendation model performance. + AttributionToken string `json:"attributionToken,omitempty"` - // SummarySkippedReasons: Additional summary-skipped reasons. This - // provides the reason for ignored cases. If nothing is skipped, this - // field is not set. - // - // Possible values: - // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary - // skipped reason is not specified. - // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. - // Only populated when SummarySpec.ignore_adversarial_query is set to - // `true`. - // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query - // ignored case. Only populated when - // SummarySpec.ignore_non_summary_seeking_query is set to `true`. - // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored - // case. Google skips the summary if there are no high-relevance search - // results. For example, the data store contains facts about company A - // but the user query is asking questions about company B. - // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. - // Google skips the summary if there is a potential policy violation - // detected. This includes content that may be violent or toxic. - // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google - // skips the summary if the LLM addon is not enabled. - SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` + // MissingIds: IDs of documents in the request that were missing from + // the default Branch associated with the requested ServingConfig. + MissingIds []string `json:"missingIds,omitempty"` - // SummaryText: The summary content. - SummaryText string `json:"summaryText,omitempty"` + // Results: A list of recommended Documents. The order represents the + // ranking (from the most relevant Document to the least). + Results []*GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult `json:"results,omitempty"` - // SummaryWithMetadata: Summary with metadata information. - SummaryWithMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` + // ValidateOnly: True if RecommendRequest.validate_only was set. + ValidateOnly bool `json:"validateOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "AttributionToken") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10759,7 +11703,7 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SafetyAttributes") to + // NullFields is a list of field names (e.g. "AttributionToken") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -10769,26 +11713,31 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummary) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummary +func (s *GoogleCloudDiscoveryengineV1betaRecommendResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation: -// Citation info for a segment. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { - // EndIndex: End of the attributed segment, exclusive. - EndIndex int64 `json:"endIndex,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult: +// +// RecommendationResult represents a generic recommendation result with +// +// associated metadata. +type GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult struct { + // Document: Set if `returnDocument` is set to true in + // RecommendRequest.params. + Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` - // Sources: Citation sources for the attributed segment. - Sources []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource `json:"sources,omitempty"` + // Id: Resource ID of the recommended Document. + Id string `json:"id,omitempty"` - // StartIndex: Index indicates the start of the segment, measured in - // bytes/unicode. - StartIndex int64 `json:"startIndex,omitempty,string"` + // Metadata: Additional Document metadata / annotations. Possible + // values: * `score`: Recommendation score in double value. Is set if + // `returnScore` is set to true in RecommendRequest.params. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndIndex") to + // ForceSendFields is a list of field names (e.g. "Document") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10796,7 +11745,7 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndIndex") to include in + // NullFields is a list of field names (e.g. "Document") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10805,20 +11754,21 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation +func (s *GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecommendResponseRecommendationResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata: -// -// Citation metadata. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struct { - // Citations: Citations for segments. - Citations []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation `json:"citations,omitempty"` +// GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest: Request message +// for SiteSearchEngineService.RecrawlUris method. +type GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest struct { + // Uris: Required. List of URIs to crawl. At most 10K URIs are + // supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI + // should match at least one TargetSite in `site_search_engine`. + Uris []string `json:"uris,omitempty"` - // ForceSendFields is a list of field names (e.g. "Citations") to + // ForceSendFields is a list of field names (e.g. "Uris") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10826,8 +11776,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struc // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Citations") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Uris") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10835,21 +11785,25 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struc NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata +func (s *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource: -// Citation source. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource struct { - // ReferenceIndex: Document reference index from - // SummaryWithMetadata.references. It is 0-indexed and the value will be - // zero if the reference_index is not set explicitly. - ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaReply: Defines a reply message to +// user. +type GoogleCloudDiscoveryengineV1betaReply struct { + // References: References in the reply. + References []*GoogleCloudDiscoveryengineV1betaReplyReference `json:"references,omitempty"` - // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to + // Reply: DEPRECATED: use `summary` instead. Text reply. + Reply string `json:"reply,omitempty"` + + // Summary: Summary based on search results. + Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` + + // ForceSendFields is a list of field names (e.g. "References") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10857,42 +11811,37 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource struct // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ReferenceIndex") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "References") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource +func (s *GoogleCloudDiscoveryengineV1betaReply) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaReply raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference: -// Document reference. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference struct { - // ChunkContents: List of cited chunk contents derived from document - // content. - ChunkContents []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` +// GoogleCloudDiscoveryengineV1betaReplyReference: Defines reference in +// reply. +type GoogleCloudDiscoveryengineV1betaReplyReference struct { + // AnchorText: Anchor text. + AnchorText string `json:"anchorText,omitempty"` - // Document: Required. Document.name of the document. Full resource name - // of the referenced document, in the format - // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document - // s/*`. - Document string `json:"document,omitempty"` + // End: Anchor text end index. + End int64 `json:"end,omitempty"` - // Title: Title of the document. - Title string `json:"title,omitempty"` + // Start: Anchor text start index. + Start int64 `json:"start,omitempty"` - // Uri: Cloud Storage or HTTP uri for the document. + // Uri: URI link reference. Uri string `json:"uri,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChunkContents") to + // ForceSendFields is a list of field names (e.g. "AnchorText") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10900,31 +11849,47 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChunkContents") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "AnchorText") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference +func (s *GoogleCloudDiscoveryengineV1betaReplyReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaReplyReference raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkCon -// tent: Chunk content. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent struct { - // Content: Chunk textual content. - Content string `json:"content,omitempty"` +// GoogleCloudDiscoveryengineV1betaResumeEngineRequest: Request for +// resuming training of an engine. +type GoogleCloudDiscoveryengineV1betaResumeEngineRequest struct { +} - // PageIdentifier: Page identifier. - PageIdentifier string `json:"pageIdentifier,omitempty"` +// GoogleCloudDiscoveryengineV1betaSchema: Defines the structure and +// layout of a type of document data. +type GoogleCloudDiscoveryengineV1betaSchema struct { + // JsonSchema: The JSON representation of the schema. + JsonSchema string `json:"jsonSchema,omitempty"` - // ForceSendFields is a list of field names (e.g. "Content") to + // Name: Immutable. The full resource name of the schema, in the format + // of + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/schemas/{schema}`. This field must be a UTF-8 + // encoded string with a length limit of 1024 characters. + Name string `json:"name,omitempty"` + + // StructSchema: The structured representation of the schema. + StructSchema googleapi.RawMessage `json:"structSchema,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "JsonSchema") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10932,7 +11897,7 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Content") to include in + // NullFields is a list of field names (e.g. "JsonSchema") to include in // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -10941,25 +11906,40 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent +func (s *GoogleCloudDiscoveryengineV1betaSchema) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSchema raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes: -// -// Safety Attribute categories and their associated confidence scores. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struct { - // Categories: The display names of Safety Attribute categories - // associated with the generated content. Order matches the Scores. - Categories []string `json:"categories,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchInfo: Detailed search +// information. +type GoogleCloudDiscoveryengineV1betaSearchInfo struct { + // Offset: An integer that specifies the current offset for pagination + // (the 0-indexed starting location, amongst the products deemed by the + // API as relevant). See SearchRequest.offset for definition. If this + // field is negative, an `INVALID_ARGUMENT` is returned. This can only + // be set for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + Offset int64 `json:"offset,omitempty"` - // Scores: The confidence scores of the each category, higher value - // means higher confidence. Order matches the Categories. - Scores []float64 `json:"scores,omitempty"` + // OrderBy: The order in which products are returned, if applicable. See + // SearchRequest.order_by for definition and syntax. The value must be a + // UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This can only be + // set for `search` events. Other event types should not set this field. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + OrderBy string `json:"orderBy,omitempty"` - // ForceSendFields is a list of field names (e.g. "Categories") to + // SearchQuery: The user's search query. See SearchRequest.query for + // definition. The value must be a UTF-8 encoded string with a length + // limit of 5,000 characters. Otherwise, an `INVALID_ARGUMENT` error is + // returned. At least one of search_query or PageInfo.page_category is + // required for `search` events. Other event types should not set this + // field. Otherwise, an `INVALID_ARGUMENT` error is returned. + SearchQuery string `json:"searchQuery,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Offset") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -10967,8 +11947,8 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struc // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Categories") to include in - // API requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "Offset") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -10976,42 +11956,181 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struc NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes +func (s *GoogleCloudDiscoveryengineV1betaSearchInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes - var s1 struct { - Scores []gensupport.JSONFloat64 `json:"scores"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Scores = make([]float64, len(s1.Scores)) - for i := range s1.Scores { - s.Scores[i] = float64(s1.Scores[i]) - } - return nil -} +// GoogleCloudDiscoveryengineV1betaSearchRequest: Request message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchRequest struct { + // BoostSpec: Boost specification to boost certain documents. For more + // information on boosting, see Boosting + // (https://cloud.google.com/retail/docs/boosting#boost) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` -// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetada -// ta: Summary with metadata information. -type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata struct { - // CitationMetadata: Citation metadata for given summary. - CitationMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` + // Branch: The branch resource name, such as + // `projects/*/locations/global/collections/default_collection/dataStores + // /default_data_store/branches/0`. Use `default_branch` as the branch + // ID or leave this field empty, to search documents under the default + // branch. + Branch string `json:"branch,omitempty"` - // References: Document References. - References []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference `json:"references,omitempty"` + // CanonicalFilter: The default filter that is applied when a user + // performs a search without checking any filters on the search page. + // The filter applied to every search request when quality improvement + // such as query expansion is needed. In the case a query does not have + // a sufficient amount of results this filter will be used to determine + // whether or not to enable the query expansion flow. The original + // filter will still be used for the query expanded search. This field + // is strongly recommended to achieve high search quality. For more + // information about filter syntax, see SearchRequest.filter. + CanonicalFilter string `json:"canonicalFilter,omitempty"` - // Summary: Summary text with no citation information. - Summary string `json:"summary,omitempty"` + // ContentSearchSpec: A specification for configuring the behavior of + // content search. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` - // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // DataStoreSpecs: A list of data store specs to apply on a search call. + DataStoreSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec `json:"dataStoreSpecs,omitempty"` + + // EmbeddingSpec: Uses the provided embedding to do additional semantic + // document retrieval. The retrieval is based on the dot product of + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the document + // embedding that is provided in + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.field_path is not + // provided, it will use ServingConfig.EmbeddingConfig.field_path. + EmbeddingSpec *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec `json:"embeddingSpec,omitempty"` + + // FacetSpecs: Facet specifications for faceted search. If empty, no + // facets are returned. A maximum of 100 values are allowed. Otherwise, + // an `INVALID_ARGUMENT` error is returned. + FacetSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec `json:"facetSpecs,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. Filter expression is case-sensitive. If this field is + // unrecognizable, an `INVALID_ARGUMENT` is returned. Filtering in + // Vertex AI Search is done by mapping the LHS filter key to a key + // property defined in the Vertex AI Search backend -- this mapping is + // defined by the customer in their schema. For example a media customer + // might have a field 'name' in their schema. In this case the filter + // would look like this: filter --> name:'ANY("king kong")' For more + // information about filtering including syntax and filter operators, + // see Filter + // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) + Filter string `json:"filter,omitempty"` + + // ImageQuery: Raw image query. + ImageQuery *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery `json:"imageQuery,omitempty"` + + // Offset: A 0-indexed integer that specifies the current offset (that + // is, starting result location, amongst the Documents deemed by the API + // as relevant) in search results. This field is only considered if + // page_token is unset. If this field is negative, an `INVALID_ARGUMENT` + // is returned. + Offset int64 `json:"offset,omitempty"` + + // OrderBy: The order in which documents are returned. Documents can be + // ordered by a field in an Document object. Leave it unset if ordered + // by relevance. `order_by` expression is case-sensitive. For more + // information on ordering, see Ordering + // (https://cloud.google.com/retail/docs/filter-and-order#order) If this + // field is unrecognizable, an `INVALID_ARGUMENT` is returned. + OrderBy string `json:"orderBy,omitempty"` + + // PageSize: Maximum number of Documents to return. The maximum allowed + // value depends on the data type. Values above the maximum value are + // coerced to the maximum value. * Websites with basic indexing: Default + // `10`, Maximum `25`. * Websites with advanced indexing: Default `25`, + // Maximum `50`. * Other: Default `50`, Maximum `100`. If this field is + // negative, an `INVALID_ARGUMENT` is returned. + PageSize int64 `json:"pageSize,omitempty"` + + // PageToken: A page token received from a previous SearchService.Search + // call. Provide this to retrieve the subsequent page. When paginating, + // all other parameters provided to SearchService.Search must match the + // call that provided the page token. Otherwise, an `INVALID_ARGUMENT` + // error is returned. + PageToken string `json:"pageToken,omitempty"` + + // Params: Additional search parameters. For public website search only, + // supported values are: * `user_country_code`: string. Default empty. + // If set to non-empty, results are restricted or boosted based on the + // location provided. Example: user_country_code: "au" For available + // codes see Country Codes + // (https://developers.google.com/custom-search/docs/json_api_reference#countryCodes) + // * `search_type`: double. Default empty. Enables non-webpage searching + // depending on the value. The only valid non-default value is 1, which + // enables image searching. Example: search_type: 1 + Params googleapi.RawMessage `json:"params,omitempty"` + + // Query: Raw search query. + Query string `json:"query,omitempty"` + + // QueryExpansionSpec: The query expansion specification that specifies + // the conditions under which query expansion occurs. + QueryExpansionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec `json:"queryExpansionSpec,omitempty"` + + // RankingExpression: The ranking expression controls the customized + // ranking on retrieval documents. This overrides + // ServingConfig.ranking_expression. The ranking expression is a single + // function or multiple functions that are joint by "+". * + // ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: + // `relevance_score`: pre-defined keywords, used for measure relevance + // between query and document. `embedding_field_path`: the document + // embedding field used with query embedding vector. `dotProduct`: + // embedding function between embedding_field_path and query embedding + // vector. Example ranking expression: If document has an embedding + // field doc_embedding, the ranking expression could be `0.5 * + // relevance_score + 0.3 * dotProduct(doc_embedding)`. + RankingExpression string `json:"rankingExpression,omitempty"` + + // SafeSearch: Whether to turn on safe search. This is only supported + // for website search. + SafeSearch bool `json:"safeSearch,omitempty"` + + // SpellCorrectionSpec: The spell correction specification that + // specifies the mode under which spell correction takes effect. + SpellCorrectionSpec *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec `json:"spellCorrectionSpec,omitempty"` + + // UserInfo: Information about the end user. Highly recommended for + // analytics. UserInfo.user_agent is used to deduce `device_type` for + // analytics. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + + // UserLabels: The user labels applied to a resource must meet the + // following requirements: * Each resource can have multiple labels, up + // to a maximum of 64. * Each label must be a key-value pair. * Keys + // have a minimum length of 1 character and a maximum length of 63 + // characters and cannot be empty. Values can be empty and have a + // maximum length of 63 characters. * Keys and values can contain only + // lowercase letters, numeric characters, underscores, and dashes. All + // characters must use UTF-8 encoding, and international characters are + // allowed. * The key portion of a label must be unique. However, you + // can use the same key with multiple resources. * Keys must start with + // a lowercase letter or international character. See Google Cloud + // Document + // (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + // for more details. + UserLabels map[string]string `json:"userLabels,omitempty"` + + // UserPseudoId: A unique identifier for tracking visitors. For example, + // this could be implemented with an HTTP cookie, which should be able + // to uniquely identify a visitor on a single device. This unique + // identifier should not change if the visitor logs in or out of the + // website. This field should NOT have a fixed value such as + // `unknown_visitor`. This should be the same identifier as + // UserEvent.user_pseudo_id and CompleteQueryRequest.user_pseudo_id The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BoostSpec") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11019,7 +12138,39 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata st // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CitationMetadata") to + // NullFields is a list of field names (e.g. "BoostSpec") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec: Boost +// specification to boost certain documents. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec struct { + // ConditionBoostSpecs: Condition boost specifications. If a document + // matches multiple conditions in the specifictions, boost scores from + // these specifications are all applied and combined in a non-linear + // way. Maximum number of specifications is 20. + ConditionBoostSpecs []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec `json:"conditionBoostSpecs,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ConditionBoostSpecs") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ConditionBoostSpecs") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11029,151 +12180,128 @@ type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata st NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaServingConfig: Configures metadata -// that is used to generate serving time results (e.g. search results or -// recommendation predictions). The ServingConfig is passed in the -// search and predict request and generates results. -type GoogleCloudDiscoveryengineV1betaServingConfig struct { - // BoostControlIds: Boost controls to use in serving path. All triggered - // boost controls will be applied. Boost controls must be in the same - // data store as the serving config. Maximum of 20 boost controls. - BoostControlIds []string `json:"boostControlIds,omitempty"` - - // CreateTime: Output only. ServingConfig created timestamp. - CreateTime string `json:"createTime,omitempty"` - - // DisplayName: Required. The human readable serving config display - // name. Used in Discovery UI. This field must be a UTF-8 encoded string - // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT - // error is returned. - DisplayName string `json:"displayName,omitempty"` - - // DissociateControlIds: Condition do not associate specifications. If - // multiple do not associate conditions match, all matching do not - // associate controls in the list will execute. Order does not matter. - // Maximum number of specifications is 100. Can only be set if - // SolutionType is SOLUTION_TYPE_SEARCH. - DissociateControlIds []string `json:"dissociateControlIds,omitempty"` - - // DiversityLevel: How much diversity to use in recommendation model - // results e.g. `medium-diversity` or `high-diversity`. Currently - // supported values: * `no-diversity` * `low-diversity` * - // `medium-diversity` * `high-diversity` * `auto-diversity` If not - // specified, we choose default based on recommendation model type. - // Default value: `no-diversity`. Can only be set if SolutionType is - // SOLUTION_TYPE_RECOMMENDATION. - DiversityLevel string `json:"diversityLevel,omitempty"` - - // EmbeddingConfig: Bring your own embedding config. The config is used - // for search semantic retrieval. The retrieval is based on the dot - // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the - // document embeddings that are provided by this EmbeddingConfig. If - // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it - // overrides this ServingConfig.embedding_config. - EmbeddingConfig *GoogleCloudDiscoveryengineV1betaEmbeddingConfig `json:"embeddingConfig,omitempty"` - - // FilterControlIds: Filter controls to use in serving path. All - // triggered filter controls will be applied. Filter controls must be in - // the same data store as the serving config. Maximum of 20 filter - // controls. - FilterControlIds []string `json:"filterControlIds,omitempty"` - - // GenericConfig: The GenericConfig of the serving configuration. - GenericConfig *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig `json:"genericConfig,omitempty"` - - // IgnoreControlIds: Condition ignore specifications. If multiple ignore - // conditions match, all matching ignore controls in the list will - // execute. Order does not matter. Maximum number of specifications is - // 100. - IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` - - // MediaConfig: The MediaConfig of the serving configuration. - MediaConfig *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig `json:"mediaConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSp +// ec: Boost applies to documents which match a condition. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec struct { + // Boost: Strength of the condition boost, which should be in [-1, 1]. + // Negative boost means demotion. Default is 0.0. Setting to 1.0 gives + // the document a big promotion. However, it does not necessarily mean + // that the boosted document will be the top result at all times, nor + // that other documents will be excluded. Results could still be shown + // even when none of them matches the condition. And results that are + // significantly more relevant to the search query can still trump your + // heavily favored but irrelevant documents. Setting to -1.0 gives the + // document a big demotion. However, results that are deeply relevant + // might still be shown. The document will have an upstream battle to + // get a fairly high ranking, but it is not blocked out completely. + // Setting to 0.0 means no boost applied. The boosting condition is + // ignored. Only one of the (condition, boost) combination or the + // boost_control_spec below are set. If both are set then the global + // boost is ignored and the more fine-grained boost_control_spec is + // applied. + Boost float64 `json:"boost,omitempty"` - // ModelId: The id of the model to use at serving time. Currently only - // RecommendationModels are supported. Can be changed but only to a - // compatible model (e.g. others-you-may-like CTR to others-you-may-like - // CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. - ModelId string `json:"modelId,omitempty"` + // BoostControlSpec: Complex specification for custom ranking based on + // customer defined attribute value. + BoostControlSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec `json:"boostControlSpec,omitempty"` - // Name: Immutable. Fully qualified name - // `projects/{project}/locations/{location}/collections/{collection_id}/e - // ngines/{engine_id}/servingConfigs/{serving_config_id}` - Name string `json:"name,omitempty"` + // Condition: An expression which specifies a boost condition. The + // syntax and supported fields are the same as a filter expression. See + // SearchRequest.filter for detail syntax and limitations. Examples: * + // To boost documents with document ID "doc_1" or "doc_2", and color + // "Red" or "Blue": `(document_id: ANY("doc_1", "doc_2")) AND (color: + // ANY("Red", "Blue"))` + Condition string `json:"condition,omitempty"` - // OnewaySynonymsControlIds: Condition oneway synonyms specifications. - // If multiple oneway synonyms conditions match, all matching oneway - // synonyms controls in the list will execute. Maximum number of - // specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // 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. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // RankingExpression: The ranking expression controls the customized - // ranking on retrieval documents. To leverage this, document embedding - // is required. The ranking expression setting in ServingConfig applies - // to all search requests served by the serving config. However, if - // SearchRequest.ranking_expression is specified, it overrides the - // ServingConfig ranking expression. The ranking expression is a single - // function or multiple functions that are joined by "+". * - // ranking_expression = function, { " + ", function }; Supported - // functions: * double * relevance_score * double * - // dotProduct(embedding_field_path) Function variables: relevance_score: - // pre-defined keywords, used for measure relevance between query and - // document. embedding_field_path: the document embedding field used - // with query embedding vector. dotProduct: embedding function between - // embedding_field_path and query embedding vector. Example ranking - // expression: If document has an embedding field doc_embedding, the - // ranking expression could be 0.5 * relevance_score + 0.3 * - // dotProduct(doc_embedding). - RankingExpression string `json:"rankingExpression,omitempty"` + // 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. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} - // RedirectControlIds: IDs of the redirect controls. Only the first - // triggered redirect action is applied, even if multiple apply. Maximum - // number of specifications is 100. Can only be set if SolutionType is - // SOLUTION_TYPE_SEARCH. - RedirectControlIds []string `json:"redirectControlIds,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} - // ReplacementControlIds: Condition replacement specifications. Applied - // according to the order in the list. A previously replaced term can - // not be re-replaced. Maximum number of specifications is 100. Can only - // be set if SolutionType is SOLUTION_TYPE_SEARCH. - ReplacementControlIds []string `json:"replacementControlIds,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpec + var s1 struct { + Boost gensupport.JSONFloat64 `json:"boost"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Boost = float64(s1.Boost) + return nil +} - // SolutionType: Required. Immutable. Specifies the solution type that a - // serving config can be associated with. +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSp +// ecBoostControlSpec: Specification for custom ranking based on +// customer specified attribute value. It provides more controls for +// customized ranking than the simple (condition, boost) combination +// above. +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec struct { + // AttributeType: The attribute type to be used to determine the boost + // amount. The attribute value can be derived from the field value of + // the specified field_name. In the case of numerical it is + // straightforward i.e. attribute_value = numerical_field_value. In the + // case of freshness however, attribute_value = (time.now() - + // datetime_field_value). // // Possible values: - // "SOLUTION_TYPE_UNSPECIFIED" - Default value. - // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. - // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. - // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative - // AI agent. - // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the - // Generative Chat agent. It's used for Generative chat engine only, the - // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` - // solution. - SolutionType string `json:"solutionType,omitempty"` - - // SynonymsControlIds: Condition synonyms specifications. If multiple - // synonyms conditions match, all matching synonyms controls in the list - // will execute. Maximum number of specifications is 100. Can only be - // set if SolutionType is SOLUTION_TYPE_SEARCH. - SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` - - // UpdateTime: Output only. ServingConfig updated timestamp. - UpdateTime string `json:"updateTime,omitempty"` + // "ATTRIBUTE_TYPE_UNSPECIFIED" - Unspecified AttributeType. + // "NUMERICAL" - The value of the numerical field will be used to + // dynamically update the boost amount. In this case, the + // attribute_value (the x value) of the control point will be the actual + // value of the numerical field for which the boost_amount is specified. + // "FRESHNESS" - For the freshness use case the attribute value will + // be the duration between the current time and the date in the datetime + // field specified. The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration + // value). The pattern for this is: `nDnM]`. E.g. `5D`, `3DT12H30M`, + // `T24H`. + AttributeType string `json:"attributeType,omitempty"` + + // ControlPoints: The control points used to define the curve. The + // monotonic function (defined through the interpolation_type above) + // passes through the control points listed here. + ControlPoints []*GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint `json:"controlPoints,omitempty"` + + // FieldName: The name of the field whose value will be used to + // determine the boost amount. + FieldName string `json:"fieldName,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // InterpolationType: The interpolation type to be applied to connect + // the control points listed below. + // + // Possible values: + // "INTERPOLATION_TYPE_UNSPECIFIED" - Interpolation type is + // unspecified. In this case, it defaults to Linear. + // "LINEAR" - Piecewise linear interpolation will be applied. + InterpolationType string `json:"interpolationType,omitempty"` - // ForceSendFields is a list of field names (e.g. "BoostControlIds") to + // ForceSendFields is a list of field names (e.g. "AttributeType") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11181,39 +12309,46 @@ type GoogleCloudDiscoveryengineV1betaServingConfig struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BoostControlIds") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "AttributeType") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfig +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies -// the configurations needed for Generic Discovery.Currently we support: -// * `content_search_spec`: configuration for generic content search. -type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { - // ContentSearchSpec: Specifies the expected behavior of content search. - // Only valid for content-search enabled data store. - ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSp +// ecBoostControlSpecControlPoint: The control points used to define the +// curve. The curve defined through these control points can only be +// monotonically increasing or decreasing(constant values are +// acceptable). +type GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint struct { + // AttributeValue: Can be one of: 1. The numerical field value. 2. The + // duration spec for freshness: The value must be formatted as an XSD + // `dayTimeDuration` value (a restricted subset of an ISO 8601 duration + // value). The pattern for this is: `nDnM]`. + AttributeValue string `json:"attributeValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") - // to unconditionally include in API requests. By default, fields with + // BoostAmount: The value between -1 to 1 by which to boost the score if + // the attribute_value evaluates to the value specified above. + BoostAmount float64 `json:"boostAmount,omitempty"` + + // ForceSendFields is a list of field names (e.g. "AttributeValue") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContentSearchSpec") to + // NullFields is a list of field names (e.g. "AttributeValue") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11223,143 +12358,43 @@ type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig: Specifies -// the configurations needed for Media Discovery. Currently we support: -// * `demote_content_watched`: Threshold for watched content demotion. -// Customers can specify if using watched content demotion or use viewed -// detail page. Using the content watched demotion, customers need to -// specify the watched minutes or percentage exceeds the threshold, the -// content will be demoted in the recommendation result. * -// `promote_fresh_content`: cutoff days for fresh content promotion. -// Customers can specify if using content freshness promotion. If the -// content was published within the cutoff days, the content will be -// promoted in the recommendation result. Can only be set if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. -type GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig struct { - // ContentFreshnessCutoffDays: Specifies the content freshness used for - // recommendation result. Contents will be demoted if contents were - // published for more than content freshness cutoff days. - ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` - - // ContentWatchedPercentageThreshold: Specifies the content watched - // percentage threshold for demotion. Threshold value must be between - // [0, 1.0] inclusive. - ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` - - // ContentWatchedSecondsThreshold: Specifies the content watched minutes - // threshold for demotion. - ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` - - // DemotionEventType: Specifies the event type used for demoting - // recommendation result. Currently supported values: * `view-item`: - // Item viewed. * `media-play`: Start/resume watching a video, playing a - // song, etc. * `media-complete`: Finished or stopped midway through a - // video, song, etc. If unset, watch history demotion will not be - // applied. Content freshness demotion will still be applied. - DemotionEventType string `json:"demotionEventType,omitempty"` - - // ForceSendFields is a list of field names (e.g. - // "ContentFreshnessCutoffDays") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted - // from API requests. However, any non-pointer, non-interface field - // appearing in ForceSendFields will be sent to the server regardless of - // whether the field is empty or not. This may be used to include empty - // fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. - // "ContentFreshnessCutoffDays") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted - // from API requests. However, any field with an empty value appearing - // in NullFields will be sent to the server as null. It is an error if a - // field in this list has a non-empty value. This may be used to include - // null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpecConditionBoostSpecBoostControlSpecControlPoint var s1 struct { - ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` - ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + BoostAmount gensupport.JSONFloat64 `json:"boostAmount"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) - s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + s.BoostAmount = float64(s1.BoostAmount) return nil } -// GoogleCloudDiscoveryengineV1betaSiteSearchEngine: SiteSearchEngine -// captures DataStore level site search persisting configurations. It is -// a singleton value per data store. -type GoogleCloudDiscoveryengineV1betaSiteSearchEngine struct { - // Name: The fully qualified resource name of the site search engine. - // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` - Name string `json:"name,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` - - // ForceSendFields is a list of field names (e.g. "Name") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Name") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaSiteSearchEngine) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteSearchEngine - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec: A +// specification for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec struct { + // ExtractiveContentSpec: If there is no extractive_content_spec + // provided, there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` -// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification -// information for target sites in advanced site search. -type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { - // SiteVerificationState: Site verification state indicating the - // ownership and validity. - // - // Possible values: - // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. - // "VERIFIED" - Site ownership verified. - // "UNVERIFIED" - Site ownership pending verification or verification - // failed. - // "EXEMPTED" - Site exempt from verification, e.g., a public website - // that opens to all. - SiteVerificationState string `json:"siteVerificationState,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not + // included in the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` - // VerifyTime: Latest site verification time. - VerifyTime string `json:"verifyTime,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not + // included in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` // ForceSendFields is a list of field names (e.g. - // "SiteVerificationState") to unconditionally include in API requests. + // "ExtractiveContentSpec") to unconditionally include in API requests. // By default, fields with empty or default values are omitted from API // requests. However, any non-pointer, non-interface field appearing in // ForceSendFields will be sent to the server regardless of whether the @@ -11367,7 +12402,7 @@ type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SiteVerificationState") to + // NullFields is a list of field names (e.g. "ExtractiveContentSpec") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11377,79 +12412,98 @@ type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSpannerSource: The Spanner source for -// importing data -type GoogleCloudDiscoveryengineV1betaSpannerSource struct { - // DatabaseId: Required. The database ID of the source Spanner table. - DatabaseId string `json:"databaseId,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtracti +// veContentSpec: A specification for configuring the extractive content +// in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec struct { + // MaxExtractiveAnswerCount: The maximum number of extractive answers + // returned in each search result. An extractive answer is a verbatim + // answer extracted from the original document, which provides a precise + // and contextually relevant answer to the search query. If the number + // of matching answers is less than the `max_extractive_answer_count`, + // return all of the answers. Otherwise, return the + // `max_extractive_answer_count`. At most five answers are returned for + // each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,omitempty"` - // EnableDataBoost: Optional. Whether to apply data boost on Spanner - // export. Enabling this option will incur additional cost. More info: - // https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas - EnableDataBoost bool `json:"enableDataBoost,omitempty"` + // MaxExtractiveSegmentCount: The max number of extractive segments + // returned in each search result. Only applied if the DataStore is set + // to DataStore.ContentConfig.CONTENT_REQUIRED or + // DataStore.solution_types is SOLUTION_TYPE_CHAT. An extractive segment + // is a text segment extracted from the original document that is + // relevant to the search query, and, in general, more verbose than an + // extractive answer. The segment could then be used as input for LLMs + // to generate summaries and answers. If the number of matching segments + // is less than `max_extractive_segment_count`, return all of the + // segments. Otherwise, return the `max_extractive_segment_count`. + MaxExtractiveSegmentCount int64 `json:"maxExtractiveSegmentCount,omitempty"` - // InstanceId: Required. The instance ID of the source Spanner table. - InstanceId string `json:"instanceId,omitempty"` + // NumNextSegments: Return at most `num_next_segments` segments after + // each selected segments. + NumNextSegments int64 `json:"numNextSegments,omitempty"` - // ProjectId: The project ID that the Spanner source is in with a length - // limit of 128 characters. If not specified, inherits the project ID - // from the parent request. - ProjectId string `json:"projectId,omitempty"` + // NumPreviousSegments: Specifies whether to also include the adjacent + // from each selected segments. Return at most `num_previous_segments` + // segments before each selected segments. + NumPreviousSegments int64 `json:"numPreviousSegments,omitempty"` - // TableId: Required. The table name of the Spanner database that needs - // to be imported. - TableId string `json:"tableId,omitempty"` + // ReturnExtractiveSegmentScore: Specifies whether to return the + // confidence score from the extractive segments in each search result. + // This feature is available only for new or allowlisted data stores. To + // allowlist your data store, please contact your Customer Engineer. The + // default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,omitempty"` - // ForceSendFields is a list of field names (e.g. "DatabaseId") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "MaxExtractiveAnswerCount") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DatabaseId") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSpannerSource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSpannerSource +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecExtractiveContentSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry: Suggestion -// deny list entry identifying the phrase to block from suggestions and -// the applied operation for the phrase. -type GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry struct { - // BlockPhrase: Required. Phrase to block from suggestions served. Can - // be maximum 125 characters. - BlockPhrase string `json:"blockPhrase,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetS +// pec: A specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec struct { + // MaxSnippetCount: [DEPRECATED] This field is deprecated. To control + // snippet return, use `return_snippet` field. For backwards + // compatibility, we will return snippet if max_snippet_count > 0. + MaxSnippetCount int64 `json:"maxSnippetCount,omitempty"` - // MatchOperator: Required. The match operator to apply for this phrase. - // Whether to block the exact phrase, or block any suggestions - // containing this phrase. - // - // Possible values: - // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used - // "EXACT_MATCH" - If the suggestion is an exact match to the - // block_phrase, then block it. - // "CONTAINS" - If the suggestion contains the block_phrase, then - // block it. - MatchOperator string `json:"matchOperator,omitempty"` + // ReferenceOnly: [DEPRECATED] This field is deprecated and will have no + // affect on the snippet. + ReferenceOnly bool `json:"referenceOnly,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlockPhrase") to + // ReturnSnippet: If `true`, then return snippet. If no snippet can be + // generated, we return "No snippet is available for this page." A + // `snippet_status` with `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also + // be returned. + ReturnSnippet bool `json:"returnSnippet,omitempty"` + + // ForceSendFields is a list of field names (e.g. "MaxSnippetCount") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11457,116 +12511,123 @@ type GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlockPhrase") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "MaxSnippetCount") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSnippetSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the -// SiteSearchEngine. -type GoogleCloudDiscoveryengineV1betaTargetSite struct { - // ExactMatch: Input only. If set to false, a uri_pattern is generated - // to include all pages whose address contains the provided_uri_pattern. - // If set to true, an uri_pattern is generated to try to be an exact - // match of the provided_uri_pattern or just the specific page if the - // provided_uri_pattern is a specific one. provided_uri_pattern is - // always normalized to generate the URI pattern to be used by the - // search engine. - ExactMatch bool `json:"exactMatch,omitempty"` - - // FailureReason: Output only. Failure reason. - FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` - - // GeneratedUriPattern: Output only. This is system-generated based on - // the provided_uri_pattern. - GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS +// pec: A specification for configuring a summary returned in a search +// response. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec struct { + // IgnoreAdversarialQuery: Specifies whether to filter out adversarial + // queries. The default value is `false`. Google employs search-query + // classification to detect adversarial queries. No summary is returned + // if the search query is classified as an adversarial query. For + // example, a user might ask a question regarding negative comments + // about the company or submit a query designed to generate unsafe, + // policy-violating output. If this field is set to `true`, we skip + // generating summaries for adversarial queries and return fallback + // messages instead. + IgnoreAdversarialQuery bool `json:"ignoreAdversarialQuery,omitempty"` - // IndexingStatus: Output only. Indexing status. - // - // Possible values: - // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. - // "PENDING" - The target site is in the update queue and will be - // picked up by indexing pipeline. - // "FAILED" - The target site fails to be indexed. - // "SUCCEEDED" - The target site has been indexed. - // "DELETING" - The previously indexed target site has been marked to - // be deleted. This is a transitioning state which will resulted in - // either: 1. target site deleted if unindexing is successful; 2. state - // reverts to SUCCEEDED if the unindexing fails. - IndexingStatus string `json:"indexingStatus,omitempty"` + // IgnoreNonSummarySeekingQuery: Specifies whether to filter out queries + // that are not summary-seeking. The default value is `false`. Google + // employs search-query classification to detect summary-seeking + // queries. No summary is returned if the search query is classified as + // a non-summary seeking query. For example, `why is the sky blue` and + // `Who is the best soccer player in the world?` are summary-seeking + // queries, but `SFO airport` and `world cup 2026` are not. They are + // most likely navigational queries. If this field is set to `true`, we + // skip generating summaries for non-summary seeking queries and return + // fallback messages instead. + IgnoreNonSummarySeekingQuery bool `json:"ignoreNonSummarySeekingQuery,omitempty"` - // Name: Output only. The fully qualified resource name of the target - // site. - // `projects/{project}/locations/{location}/collections/{collection}/data - // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The - // `target_site_id` is system-generated. - Name string `json:"name,omitempty"` + // IncludeCitations: Specifies whether to include citations in the + // summary. The default value is `false`. When this field is set to + // `true`, summaries include in-line citation numbers. Example summary + // including citations: BigQuery is Google Cloud's fully managed and + // completely serverless enterprise data warehouse [1]. BigQuery + // supports all data types, works across clouds, and has built-in + // machine learning and business intelligence, all within a unified + // platform [2, 3]. The citation numbers refer to the returned search + // results and are 1-indexed. For example, [1] means that the sentence + // is attributed to the first search result. [2, 3] means that the + // sentence is attributed to both the second and third search results. + IncludeCitations bool `json:"includeCitations,omitempty"` - // ProvidedUriPattern: Required. Input only. The user provided URI - // pattern from which the `generated_uri_pattern` is generated. - ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + // LanguageCode: Language code for Summary. Use language tags defined by + // BCP47 (https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is + // an experimental feature. + LanguageCode string `json:"languageCode,omitempty"` - // SiteVerificationInfo: Output only. Site ownership and validity - // verification status. - SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + // ModelPromptSpec: If specified, the spec will be used to modify the + // prompt provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` - // Type: The type of the target site, e.g., whether the site is to be - // included or excluded. - // - // Possible values: - // "TYPE_UNSPECIFIED" - This value is unused. In this case, server - // behavior defaults to Type.INCLUDE. - // "INCLUDE" - Include the target site. - // "EXCLUDE" - Exclude the target site. - Type string `json:"type,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,omitempty"` - // UpdateTime: Output only. The target site's last updated time. - UpdateTime string `json:"updateTime,omitempty"` + // SummaryResultCount: The number of top results to generate the summary + // from. If the number of results returned is less than + // `summaryResultCount`, the summary is generated from all of the + // results. At most 10 results can be used to generate a summary. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // UseSemanticChunks: If true, answer will be generated from most + // relevant chunks from top search results. This feature will improve + // summary quality. Please note that with this feature enabled, not all + // top search results will be referenced and included in the reference + // list, so the citation source index only points to the search results + // listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExactMatch") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // ForceSendFields is a list of field names (e.g. + // "IgnoreAdversarialQuery") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExactMatch") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") + // to include in API requests with the JSON null value. By default, + // fields with empty values are omitted from API requests. However, any + // field with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search -// indexing failure reasons. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { - // QuotaFailure: Failed due to insufficient quota. - QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS +// pecModelPromptSpec: Specification of the prompt to use with the +// model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the + // assistant. Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` - // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // ForceSendFields is a list of field names (e.g. "Preamble") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11574,61 +12635,66 @@ type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "QuotaFailure") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Preamble") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelPromptSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: -// Failed due to insufficient quota. -type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { - // TotalRequiredQuota: This number is an estimation on how much total - // quota this project needs to successfully complete indexing. - TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` +// GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummaryS +// pecModelSpec: Specification of the model. +type GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported + // values are: * `stable`: string. Default value when no value is + // specified. Uses a generally available, fine-tuned model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` - // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") - // to unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "Version") to + // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TotalRequiredQuota") to - // include in API requests with the JSON null value. By default, fields - // with empty values are omitted from API requests. However, any field - // with an empty value appearing in NullFields will be sent to the - // server as null. It is an error if a field in this list has a - // non-empty value. This may be used to include null fields in Patch - // requests. + // NullFields is a list of field names (e.g. "Version") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpecModelSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTextInput: Defines text input. -type GoogleCloudDiscoveryengineV1betaTextInput struct { - // Context: Conversation context of the input. - Context *GoogleCloudDiscoveryengineV1betaConversationContext `json:"context,omitempty"` - - // Input: Text input. - Input string `json:"input,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec: A struct +// to define data stores to filter on in a search call. +type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // DataStore: Required. Full resource name of DataStore, such as + // `projects/{project}/locations/{location}/collections/{collection_id}/d + // ataStores/{data_store_id}`. + DataStore string `json:"dataStore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Context") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11636,7 +12702,7 @@ type GoogleCloudDiscoveryengineV1betaTextInput struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Context") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -11645,24 +12711,21 @@ type GoogleCloudDiscoveryengineV1betaTextInput struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTextInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTextInput +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata -// related to the progress of the TrainCustomModel operation. This is -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec: The +// specification that uses customized query embedding vector to do +// semantic document retrieval. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec struct { + // EmbeddingVectors: The embedding vector used for retrieval. Limit to + // 1. + EmbeddingVectors []*GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector `json:"embeddingVectors,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "EmbeddingVectors") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11670,37 +12733,32 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { // This may be used to include empty fields in Patch requests. 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. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "EmbeddingVectors") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest: Request -// message for SearchTuningService.TrainCustomModel method. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest struct { - // ErrorConfig: The desired location of errors incurred during the data - // ingestion and training. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` - - // GcsTrainingInput: Cloud Storage training input. - GcsTrainingInput *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVec +// tor: Embedding vector. +type GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector struct { + // FieldPath: Embedding field path in schema. + FieldPath string `json:"fieldPath,omitempty"` - // ModelType: Model to be trained. Supported values are: * - // **search-tuning**: Fine tuning the search system based on data - // provided. - ModelType string `json:"modelType,omitempty"` + // Vector: Query embedding vector. + Vector []float64 `json:"vector,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // ForceSendFields is a list of field names (e.g. "FieldPath") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11708,60 +12766,102 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "FieldPath") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInpu -// t: Cloud Storage training data input. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput struct { - // CorpusDataPath: The Cloud Storage corpus data which could be - // associated in train data. The data path format is `gs:///`. A newline - // delimited jsonl/ndjson file. For search-tuning model, each line - // should have the _id, title and text. Example: `{"_id": "doc1", title: - // "relevant doc", "text": "relevant text"}` - CorpusDataPath string `json:"corpusDataPath,omitempty"` +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestEmbeddingSpecEmbeddingVector + var s1 struct { + Vector []gensupport.JSONFloat64 `json:"vector"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Vector = make([]float64, len(s1.Vector)) + for i := range s1.Vector { + s.Vector[i] = float64(s1.Vector[i]) + } + return nil +} - // QueryDataPath: The gcs query data which could be associated in train - // data. The data path format is `gs:///`. A newline delimited - // jsonl/ndjson file. For search-tuning model, each line should have the - // _id and text. Example: {"_id": "query1", "text": "example query"} - QueryDataPath string `json:"queryDataPath,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec: A facet +// specification to perform faceted search. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec struct { + // EnableDynamicPosition: Enables dynamic position for this facet. If + // set to true, the position of this facet among all facets in the + // response is determined automatically. If dynamic facets are enabled, + // it is ordered together. If set to false, the position of this facet + // in the response is the same as in the request, and it is ranked + // before the facets with dynamic position enable and all dynamic + // facets. For example, you may always want to have rating facet + // returned in the response, but it's not necessarily to always display + // the rating facet at the top. In that case, you can set + // enable_dynamic_position to true so that the position of rating facet + // in response is determined automatically. Another example, assuming + // you have the following facets in the request: * "rating", + // enable_dynamic_position = true * "price", enable_dynamic_position = + // false * "brands", enable_dynamic_position = false And also you have a + // dynamic facets enabled, which generates a facet `gender`. Then the + // final order of the facets in the response can be ("price", "brands", + // "rating", "gender") or ("price", "brands", "gender", "rating") + // depends on how API orders "gender" and "rating" facets. However, + // notice that "price" and "brands" are always ranked at first and + // second position because their enable_dynamic_position is false. + EnableDynamicPosition bool `json:"enableDynamicPosition,omitempty"` - // TestDataPath: Cloud Storage test data. Same format as - // train_data_path. If not provided, a random 80/20 train/test split - // will be performed on train_data_path. - TestDataPath string `json:"testDataPath,omitempty"` + // ExcludedFilterKeys: List of keys to exclude when faceting. By + // default, FacetKey.key is not excluded from the filter unless it is + // listed in this field. Listing a facet key in this field allows its + // values to appear as facet results, even when they are filtered out of + // search results. Using this field does not affect what search results + // are returned. For example, suppose there are 100 documents with the + // color facet "Red" and 200 documents with the color facet "Blue". A + // query containing the filter "color:ANY("Red")" and having "color" as + // FacetKey.key would by default return only "Red" documents in the + // search results, and also return "Red" with count 100 as the only + // color facet. Although there are also blue documents available, "Blue" + // would not be shown as an available facet value. If "color" is listed + // in "excludedFilterKeys", then the query returns the facet values + // "Red" with count 100 and "Blue" with count 200, because the "color" + // key is now excluded from the filter. Because this field doesn't + // affect search results, the search results are still correctly + // filtered to return only "Red" documents. A maximum of 100 values are + // allowed. Otherwise, an `INVALID_ARGUMENT` error is returned. + ExcludedFilterKeys []string `json:"excludedFilterKeys,omitempty"` - // TrainDataPath: Cloud Storage training data path whose format should - // be `gs:///`. The file should be in tsv format. Each line should have - // the doc_id and query_id and score (number). For search-tuning model, - // it should have the query-id corpus-id score as tsv file header. The - // score should be a number in `[0, inf+)`. The larger the number is, - // the more relevant the pair is. Example: * - // `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` - TrainDataPath string `json:"trainDataPath,omitempty"` + // FacetKey: Required. The facet key specification. + FacetKey *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey `json:"facetKey,omitempty"` - // ForceSendFields is a list of field names (e.g. "CorpusDataPath") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. + // Limit: Maximum of facet values that should be returned for this + // facet. If unspecified, defaults to 20. The maximum allowed value is + // 300. Values above 300 are coerced to 300. If this field is negative, + // an `INVALID_ARGUMENT` is returned. + Limit int64 `json:"limit,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "EnableDynamicPosition") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CorpusDataPath") to + // NullFields is a list of field names (e.g. "EnableDynamicPosition") to // include in API requests with the JSON null value. By default, fields // with empty values are omitted from API requests. However, any field // with an empty value appearing in NullFields will be sent to the @@ -11771,35 +12871,62 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput str NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of -// the TrainCustomModelRequest. This message is returned by the -// google.longrunning.Operations.response field. -type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { - // ErrorConfig: Echoes the destination for the complete errors in the - // request if set. - ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey: +// Specifies how a facet is computed. +type GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey struct { + // CaseInsensitive: True to make facet keys case insensitive when + // getting faceting values with prefixes or contains; false otherwise. + CaseInsensitive bool `json:"caseInsensitive,omitempty"` - // ErrorSamples: A sample of errors encountered while processing the - // data. - ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + // Contains: Only get facet values that contains the given strings. For + // example, suppose "category" has three values "Action > 2022", "Action + // > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the + // "category" facet only contains "Action > 2022" and "Sci-Fi > 2022". + // Only supported on textual fields. Maximum is 10. + Contains []string `json:"contains,omitempty"` - // Metrics: The metrics of the trained model. - Metrics map[string]float64 `json:"metrics,omitempty"` + // Intervals: Set only if values should be bucketed into intervals. Must + // be set for facets with numerical values. Must not be set for facet + // with text values. Maximum number of intervals is 30. + Intervals []*GoogleCloudDiscoveryengineV1betaInterval `json:"intervals,omitempty"` - // ModelStatus: The trained model status. Possible values are: * - // **bad-data**: The training data quality is bad. * **no-improvement**: - // Tuning didn't improve performance. Won't deploy. * **in-progress**: - // Model training is in progress. * **ready**: The model is ready for - // serving. - ModelStatus string `json:"modelStatus,omitempty"` + // Key: Required. Supported textual and numerical facet keys in Document + // object, over which the facet values are computed. Facet key is + // case-sensitive. + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // OrderBy: The order in which documents are returned. Allowed values + // are: * "count desc", which means order by + // SearchResponse.Facet.values.count descending. * "value desc", which + // means order by SearchResponse.Facet.values.value descending. Only + // applies to textual facets. If not set, textual values are sorted in + // natural order (https://en.wikipedia.org/wiki/Natural_sort_order); + // numerical intervals are sorted in the order given by + // FacetSpec.FacetKey.intervals. + OrderBy string `json:"orderBy,omitempty"` + + // Prefixes: Only get facet values that start with the given string + // prefix. For example, suppose "category" has three values "Action > + // 2022", "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to + // "Action", the "category" facet only contains "Action > 2022" and + // "Action > 2021". Only supported on textual fields. Maximum is 10. + Prefixes []string `json:"prefixes,omitempty"` + + // RestrictedValues: Only get facet for the given restricted values. + // Only supported on textual fields. For example, suppose "category" has + // three values "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If + // set "restricted_values" to "Action > 2022", the "category" facet only + // contains "Action > 2022". Only supported on textual fields. Maximum + // is 10. + RestrictedValues []string `json:"restrictedValues,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CaseInsensitive") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11807,56 +12934,30 @@ type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ErrorConfig") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "CaseInsensitive") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestFacetSpecFacetKey raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaTransactionInfo: A transaction -// represents the entire purchase transaction. -type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { - // Cost: All the costs associated with the products. These can be - // manufacturing costs, shipping expenses not borne by the end user, or - // any other costs, such that: * Profit = value - tax - cost - Cost float64 `json:"cost,omitempty"` - - // Currency: Required. Currency code. Use three-character ISO-4217 code. - Currency string `json:"currency,omitempty"` - - // DiscountValue: The total discount(s) value applied to this - // transaction. This figure should be excluded from - // TransactionInfo.value For example, if a user paid - // TransactionInfo.value amount, then nominal (pre-discount) value of - // the transaction is the sum of TransactionInfo.value and - // TransactionInfo.discount_value This means that profit is calculated - // the same way, regardless of the discount value, and that - // TransactionInfo.discount_value can be larger than - // TransactionInfo.value: * Profit = value - tax - cost - DiscountValue float64 `json:"discountValue,omitempty"` - - // Tax: All the taxes associated with the transaction. - Tax float64 `json:"tax,omitempty"` - - // TransactionId: The transaction ID with a length limit of 128 - // characters. - TransactionId string `json:"transactionId,omitempty"` - - // Value: Required. Total non-zero value associated with the - // transaction. This value may include shipping, tax, or other - // adjustments to the total value that you want to include. - Value float64 `json:"value,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery: Specifies +// the image query input. +type GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery struct { + // ImageBytes: Base64 encoded image bytes. Supported image formats: + // JPEG, PNG, and BMP. + ImageBytes string `json:"imageBytes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Cost") to + // ForceSendFields is a list of field names (e.g. "ImageBytes") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11864,8 +12965,8 @@ type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Cost") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ImageBytes") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -11873,81 +12974,33 @@ type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestImageQuery raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo - var s1 struct { - Cost gensupport.JSONFloat64 `json:"cost"` - DiscountValue gensupport.JSONFloat64 `json:"discountValue"` - Tax gensupport.JSONFloat64 `json:"tax"` - Value gensupport.JSONFloat64 `json:"value"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Cost = float64(s1.Cost) - s.DiscountValue = float64(s1.DiscountValue) - s.Tax = float64(s1.Tax) - s.Value = float64(s1.Value) - return nil -} - -// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata -// associated with a tune operation. -type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { - // Engine: Required. The resource name of the engine that this tune - // applies to. Format: - // `projects/{project_number}/locations/{location_id}/collections/{collec - // tion_id}/engines/{engine_id}` - Engine string `json:"engine,omitempty"` - - // ForceSendFields is a list of field names (e.g. "Engine") to - // unconditionally include in API requests. By default, fields with - // empty or default values are omitted from API requests. However, any - // non-pointer, non-interface field appearing in ForceSendFields will be - // sent to the server regardless of whether the field is empty or not. - // This may be used to include empty fields in Patch requests. - ForceSendFields []string `json:"-"` - - // NullFields is a list of field names (e.g. "Engine") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. - NullFields []string `json:"-"` -} - -func (s *GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) -} - -// GoogleCloudDiscoveryengineV1betaTuneEngineRequest: Request to -// manually start a tuning process now (instead of waiting for the -// periodically scheduled tuning to happen). -type GoogleCloudDiscoveryengineV1betaTuneEngineRequest struct { -} - -// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for -// UpdateSchema LRO. -type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec: +// Specification to determine under which conditions query expansion +// should occur. +type GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec struct { + // Condition: The condition under which query expansion should occur. + // Default to Condition.DISABLED. + // + // Possible values: + // "CONDITION_UNSPECIFIED" - Unspecified query expansion condition. In + // this case, server behavior defaults to Condition.DISABLED. + // "DISABLED" - Disabled query expansion. Only the exact search query + // is used, even if SearchResponse.total_size is zero. + // "AUTO" - Automatic query expansion built by the Search API. + Condition string `json:"condition,omitempty"` - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` + // PinUnexpandedResults: Whether to pin unexpanded results. If this + // field is set to true, unexpanded products are always at the top of + // the search results, followed by the expanded results. + PinUnexpandedResults bool `json:"pinUnexpandedResults,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // 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. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11955,7 +13008,7 @@ type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in + // 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. However, any field with an // empty value appearing in NullFields will be sent to the server as @@ -11964,25 +13017,29 @@ type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestQueryExpansionSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata -// related to the progress of the -// SiteSearchEngineService.UpdateTargetSite operation. This will be -// returned by the google.longrunning.Operation.metadata field. -type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { - // CreateTime: Operation create time. - CreateTime string `json:"createTime,omitempty"` - - // UpdateTime: Operation last update time. If the operation is done, - // this is also the finish time. - UpdateTime string `json:"updateTime,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec: The +// specification for query spell correction. +type GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec struct { + // Mode: The mode under which spell correction should take effect to + // replace the original search query. Default to Mode.AUTO. + // + // Possible values: + // "MODE_UNSPECIFIED" - Unspecified spell correction mode. In this + // case, server behavior defaults to Mode.AUTO. + // "SUGGESTION_ONLY" - Search API will try to find a spell suggestion + // if there is any and put in the SearchResponse.corrected_query. The + // spell suggestion will not be used as the search query. + // "AUTO" - Automatic spell correction built by the Search API. Search + // will be based on the corrected query if found. + Mode string `json:"mode,omitempty"` - // ForceSendFields is a list of field names (e.g. "CreateTime") to + // ForceSendFields is a list of field names (e.g. "Mode") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -11990,8 +13047,8 @@ type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { // This may be used to include empty fields in Patch requests. 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 + // NullFields is a list of field names (e.g. "Mode") to include in API + // requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -11999,164 +13056,68 @@ type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata +func (s *GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchRequestSpellCorrectionSpec raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUserEvent: UserEvent captures all -// metadata information Discovery Engine API needs to know about how end -// users interact with customers' website. -type GoogleCloudDiscoveryengineV1betaUserEvent struct { - // Attributes: Extra user event features to include in the - // recommendation model. These attributes must NOT contain data that - // needs to be parsed or processed further, e.g. JSON or other - // encodings. If you provide custom attributes for ingested user events, - // also include them in the user events that you associate with - // prediction requests. Custom attribute formatting must be consistent - // between imported events and events provided with prediction requests. - // This lets the Discovery Engine API use those custom attributes when - // training models and serving predictions, which helps improve - // recommendation quality. This field needs to pass all below criteria, - // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be - // a UTF-8 encoded string with a length limit of 5,000 characters. * For - // text attributes, at most 400 values are allowed. Empty values are not - // allowed. Each value must be a UTF-8 encoded string with a length - // limit of 256 characters. * For number attributes, at most 400 values - // are allowed. For product recommendations, an example of extra user - // information is `traffic_channel`, which is how a user arrives at the - // site. Users can arrive at the site by coming to the site directly, - // coming through Google search, or in other ways. - Attributes map[string]GoogleCloudDiscoveryengineV1betaCustomAttribute `json:"attributes,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponse: Response message for +// SearchService.Search method. +type GoogleCloudDiscoveryengineV1betaSearchResponse struct { + // AppliedControls: Controls applied as part of the Control service. + AppliedControls []string `json:"appliedControls,omitempty"` - // AttributionToken: Token to attribute an API response to user - // action(s) to trigger the event. Highly recommended for user events - // that are the result of RecommendationService.Recommend. This field - // enables accurate attribution of recommendation model performance. The - // value must be one of: * RecommendResponse.attribution_token for - // events that are the result of RecommendationService.Recommend. * - // SearchResponse.attribution_token for events that are the result of - // SearchService.Search. This token enables us to accurately attribute - // page view or conversion completion back to the event and the - // particular predict response containing this clicked/purchased - // product. If user clicks on product K in the recommendation results, - // pass RecommendResponse.attribution_token as a URL parameter to - // product K's page. When recording events on product K's page, log the - // RecommendResponse.attribution_token to this field. + // AttributionToken: A unique search token. This should be included in + // the UserEvent logs resulting from this search, which enables accurate + // attribution of search model performance. AttributionToken string `json:"attributionToken,omitempty"` - // CompletionInfo: CompletionService.CompleteQuery details related to - // the event. This field should be set for `search` event when - // autocomplete function is enabled and the user clicks a suggestion for - // search. - CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` - - // DirectUserRequest: Should set to true if the request is made directly - // from the end user, in which case the UserEvent.user_info.user_agent - // can be populated from the HTTP request. This flag should be set only - // if the API request is made directly from the end user such as a - // mobile app (and not if a gateway or a server is processing and - // pushing the user events). This should not be set when using the - // JavaScript tag in UserEventService.CollectUserEvent. - DirectUserRequest bool `json:"directUserRequest,omitempty"` - - // Documents: List of Documents associated with this user event. This - // field is optional except for the following event types: * `view-item` - // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a - // `search` event, this field represents the documents returned to the - // end user on the current page (the end user may have not finished - // browsing the whole page yet). When a new page is returned to the end - // user, after pagination/filtering/ordering even for the same query, a - // new `search` event with different UserEvent.documents is desired. - Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` - - // EventTime: Only required for UserEventService.ImportUserEvents - // method. Timestamp of when the user event happened. - EventTime string `json:"eventTime,omitempty"` - - // EventType: Required. User event type. Allowed values are: Generic - // values: * `search`: Search for Documents. * `view-item`: Detailed - // page view of a Document. * `view-item-list`: View of a panel or - // ordered list of Documents. * `view-home-page`: View of the home page. - // * `view-category-page`: View of a category page, e.g. Home > Men > - // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, - // e.g. in Retail online shopping * `purchase`: Purchase an item(s) - // Media-related values: * `media-play`: Start/resume watching a video, - // playing a song, etc. * `media-complete`: Finished or stopped midway - // through a video, song, etc. - EventType string `json:"eventType,omitempty"` - - // Filter: The filter syntax consists of an expression language for - // constructing a predicate from one or more fields of the documents - // being filtered. One example is for `search` events, the associated - // SearchRequest may contain a filter expression in SearchRequest.filter - // conforming to https://google.aip.dev/160#filtering. Similarly, for - // `view-item-list` events that are generated from a RecommendRequest, - // this field may be populated directly from RecommendRequest.filter - // conforming to https://google.aip.dev/160#filtering. The value must be - // a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. - Filter string `json:"filter,omitempty"` - - // MediaInfo: Media-specific info. - MediaInfo *GoogleCloudDiscoveryengineV1betaMediaInfo `json:"mediaInfo,omitempty"` + // CorrectedQuery: Contains the spell corrected query, if found. If the + // spell correction type is AUTOMATIC, then the search results are based + // on corrected_query. Otherwise the original query is used for search. + CorrectedQuery string `json:"correctedQuery,omitempty"` - // PageInfo: Page metadata such as categories and other critical - // information for certain event types such as `view-category-page`. - PageInfo *GoogleCloudDiscoveryengineV1betaPageInfo `json:"pageInfo,omitempty"` + // Facets: Results of facets requested by user. + Facets []*GoogleCloudDiscoveryengineV1betaSearchResponseFacet `json:"facets,omitempty"` - // Panel: Panel metadata associated with this user event. - Panel *GoogleCloudDiscoveryengineV1betaPanelInfo `json:"panel,omitempty"` + GeoSearchDebugInfo []*GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo `json:"geoSearchDebugInfo,omitempty"` - // PromotionIds: The promotion IDs if this is an event associated with - // promotions. Currently, this field is restricted to at most one ID. - PromotionIds []string `json:"promotionIds,omitempty"` + // GuidedSearchResult: Guided search result. + GuidedSearchResult *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult `json:"guidedSearchResult,omitempty"` - // SearchInfo: SearchService.Search details related to the event. This - // field should be set for `search` event. - SearchInfo *GoogleCloudDiscoveryengineV1betaSearchInfo `json:"searchInfo,omitempty"` + // NextPageToken: A token that can be sent as SearchRequest.page_token + // to retrieve the next page. If this field is omitted, there are no + // subsequent pages. + NextPageToken string `json:"nextPageToken,omitempty"` - // SessionId: A unique identifier for tracking a visitor session with a - // length limit of 128 bytes. A session is an aggregation of an end user - // behavior in a time span. A general guideline to populate the - // session_id: 1. If user has no activity for 30 min, a new session_id - // should be assigned. 2. The session_id should be unique across users, - // suggest use uuid or add UserEvent.user_pseudo_id as prefix. - SessionId string `json:"sessionId,omitempty"` + // QueryExpansionInfo: Query expansion information for the returned + // results. + QueryExpansionInfo *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo `json:"queryExpansionInfo,omitempty"` - // TagIds: A list of identifiers for the independent experiment groups - // this user event belongs to. This is used to distinguish between user - // events associated with different experiment setups on the customer - // end. - TagIds []string `json:"tagIds,omitempty"` + // RedirectUri: The URI of a customer-defined redirect page. If redirect + // action is triggered, no search is performed, and only redirect_uri + // and attribution_token are set in the response. + RedirectUri string `json:"redirectUri,omitempty"` - // TransactionInfo: The transaction metadata (if any) associated with - // this user event. - TransactionInfo *GoogleCloudDiscoveryengineV1betaTransactionInfo `json:"transactionInfo,omitempty"` + // Results: A list of matched documents. The order represents the + // ranking. + Results []*GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult `json:"results,omitempty"` - // UserInfo: Information about the end user. - UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + // Summary: A summary as part of the search results. This field is only + // returned if SearchRequest.ContentSearchSpec.summary_spec is set. + Summary *GoogleCloudDiscoveryengineV1betaSearchResponseSummary `json:"summary,omitempty"` - // UserPseudoId: Required. A unique identifier for tracking visitors. - // For example, this could be implemented with an HTTP cookie, which - // should be able to uniquely identify a visitor on a single device. - // This unique identifier should not change if the visitor log in/out of - // the website. Do not set the field to the same fixed ID for different - // users. This mixes the event history of those users together, which - // results in degraded model quality. The field must be a UTF-8 encoded - // string with a length limit of 128 characters. Otherwise, an - // `INVALID_ARGUMENT` error is returned. The field should not contain - // PII or user-data. We recommend to use Google Analytics Client ID - // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) - // for this field. - UserPseudoId string `json:"userPseudoId,omitempty"` + // TotalSize: The estimated total count of matched items irrespective of + // pagination. The count of results returned by pagination may be less + // than the total_size that matches. + TotalSize int64 `json:"totalSize,omitempty"` // ServerResponse contains the HTTP response code and headers from the // server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Attributes") to + // ForceSendFields is a list of field names (e.g. "AppliedControls") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12164,41 +13125,35 @@ type GoogleCloudDiscoveryengineV1betaUserEvent struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Attributes") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "AppliedControls") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUserEvent) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUserEvent +func (s *GoogleCloudDiscoveryengineV1betaSearchResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponse raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. -type GoogleCloudDiscoveryengineV1betaUserInfo struct { - // UserAgent: User agent as included in the HTTP header. The field must - // be a UTF-8 encoded string with a length limit of 1,000 characters. - // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not - // be set when using the client side event reporting with GTM or - // JavaScript tag in UserEventService.CollectUserEvent or if - // UserEvent.direct_user_request is set. - UserAgent string `json:"userAgent,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseFacet: A facet result. +type GoogleCloudDiscoveryengineV1betaSearchResponseFacet struct { + // DynamicFacet: Whether the facet is dynamically generated. + DynamicFacet bool `json:"dynamicFacet,omitempty"` - // UserId: Highly recommended for logged-in users. Unique identifier for - // logged-in user, such as a user name. Don't set for anonymous users. - // Always use a hashed value for this ID. Don't set the field to the - // same fixed ID for different users. This mixes the event history of - // those users together, which results in degraded model quality. The - // field must be a UTF-8 encoded string with a length limit of 128 - // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. - UserId string `json:"userId,omitempty"` + // Key: The key for this facet. E.g., "colors" or "price". It matches + // SearchRequest.FacetSpec.FacetKey.key. + Key string `json:"key,omitempty"` - // ForceSendFields is a list of field names (e.g. "UserAgent") to + // Values: The facet values for this field. + Values []*GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue `json:"values,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DynamicFacet") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12206,36 +13161,35 @@ type GoogleCloudDiscoveryengineV1betaUserInfo struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "UserAgent") to include in - // API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "DynamicFacet") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseFacet) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacet raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningListOperationsResponse: The response message for -// Operations.ListOperations. -type GoogleLongrunningListOperationsResponse struct { - // NextPageToken: The standard List next-page token. - NextPageToken string `json:"nextPageToken,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue: A +// facet value which contains value names and their count. +type GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue struct { + // Count: Number of items that have this facet value. + Count int64 `json:"count,omitempty,string"` - // Operations: A list of operations that matches the specified filter in - // the request. - Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + // Interval: Interval value for a facet, such as 10, 20) for facet + // "price". It matches [SearchRequest.FacetSpec.FacetKey.intervals. + Interval *GoogleCloudDiscoveryengineV1betaInterval `json:"interval,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // Value: Text value of a facet, such as "Black" for facet "colors". + Value string `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // ForceSendFields is a list of field names (e.g. "Count") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12243,61 +13197,33 @@ type GoogleLongrunningListOperationsResponse struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include - // in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. However, any field with - // an empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "Count") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseFacetFacetValue raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleLongrunningOperation: This resource represents a long-running -// operation that is the result of a network API call. -type GoogleLongrunningOperation struct { - // Done: If the value is `false`, it means the operation is still in - // progress. If `true`, the operation is completed, and either `error` - // or `response` is available. - Done bool `json:"done,omitempty"` - - // Error: The error result of the operation in case of failure or - // cancellation. - Error *GoogleRpcStatus `json:"error,omitempty"` - - // Metadata: Service-specific metadata associated with the operation. It - // typically contains progress information and common metadata such as - // create time. Some services might not provide such metadata. Any - // method that returns a long-running operation should document the - // metadata type, if any. - Metadata googleapi.RawMessage `json:"metadata,omitempty"` - - // Name: The server-assigned name, which is only unique within the same - // service that originally returns it. If you use the default HTTP - // mapping, the `name` should be a resource name ending with - // `operations/{unique_id}`. - Name string `json:"name,omitempty"` - - // Response: The normal, successful response of the operation. If the - // original method returns no data on success, such as `Delete`, the - // response is `google.protobuf.Empty`. If the original method is - // standard `Get`/`Create`/`Update`, the response should be the - // resource. For other methods, the response should have the type - // `XxxResponse`, where `Xxx` is the original method name. For example, - // if the original method name is `TakeSnapshot()`, the inferred - // response type is `TakeSnapshotResponse`. - Response googleapi.RawMessage `json:"response,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo: +// Debug information specifically related to forward geocoding issues +// arising from Geolocation Search. +type GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo struct { + // ErrorMessage: The error produced. + ErrorMessage string `json:"errorMessage,omitempty"` - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` + // OriginalAddressQuery: The address from which forward geocoding + // ingestion produced issues. + OriginalAddressQuery string `json:"originalAddressQuery,omitempty"` - // ForceSendFields is a list of field names (e.g. "Done") to + // ForceSendFields is a list of field names (e.g. "ErrorMessage") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12305,101 +13231,104 @@ type GoogleLongrunningOperation struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as + // NullFields is a list of field names (e.g. "ErrorMessage") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. // This may be used to include null fields in Patch requests. NullFields []string `json:"-"` } -func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGeoSearchDebugInfo raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleProtobufEmpty: A generic empty message that you can re-use to -// avoid defining duplicated empty messages in your APIs. A typical -// example is to use it as the request or the response type of an API -// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) -// returns (google.protobuf.Empty); } -type GoogleProtobufEmpty struct { - // ServerResponse contains the HTTP response code and headers from the - // server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleRpcStatus: The `Status` type defines a logical error model that -// is suitable for different programming environments, including REST -// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each -// `Status` message contains three pieces of data: error code, error -// message, and error details. You can find out more about this error -// model and how to work with it in the API Design Guide -// (https://cloud.google.com/apis/design/errors). -type GoogleRpcStatus struct { - // Code: The status code, which should be an enum value of - // google.rpc.Code. - Code int64 `json:"code,omitempty"` - - // Details: A list of messages that carry the error details. There is a - // common set of message types for APIs to use. - Details []googleapi.RawMessage `json:"details,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult: +// Guided search result. The guided search helps user to refine the +// search results and narrow down to the real needs from a broaded +// search results. +type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult struct { + // FollowUpQuestions: Suggested follow-up questions. + FollowUpQuestions []string `json:"followUpQuestions,omitempty"` - // Message: A developer-facing error message, which should be in - // English. Any user-facing error message should be localized and sent - // in the google.rpc.Status.details field, or localized by the client. - Message string `json:"message,omitempty"` + // RefinementAttributes: A list of ranked refinement attributes. + RefinementAttributes []*GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute `json:"refinementAttributes,omitempty"` - // ForceSendFields is a list of field names (e.g. "Code") to - // unconditionally include in API requests. By default, fields with + // ForceSendFields is a list of field names (e.g. "FollowUpQuestions") + // to unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be // sent to the server regardless of whether the field is empty or not. // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API - // requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. However, any field with an - // empty value appearing in NullFields will be sent to the server as - // null. It is an error if a field in this list has a non-empty value. - // This may be used to include null fields in Patch requests. + // NullFields is a list of field names (e.g. "FollowUpQuestions") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. NullFields []string `json:"-"` } -func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResult raw := NoMethod(*s) return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) } -// GoogleTypeDate: Represents a whole or partial calendar date, such as -// a birthday. The time of day and time zone are either specified -// elsewhere or are insignificant. The date is relative to the Gregorian -// Calendar. This can represent one of the following: * A full date, -// with non-zero year, month, and day values. * A month and day, with a -// zero year (for example, an anniversary). * A year on its own, with a -// zero month and a zero day. * A year and month, with a zero day (for -// example, a credit card expiration date). Related types: * -// google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and - // month, or 0 to specify a year by itself or a year and month where the - // day isn't significant. - Day int64 `json:"day,omitempty"` +// GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefine +// mentAttribute: Useful attribute for search result refinements. +type GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute struct { + // AttributeKey: Attribute key used to refine the results e.g. + // 'movie_type'. + AttributeKey string `json:"attributeKey,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year - // without a month and day. - Month int64 `json:"month,omitempty"` + // AttributeValue: Attribute value used to refine the results e.g. + // 'drama'. + AttributeValue string `json:"attributeValue,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a - // date without a year. - Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "AttributeKey") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` - // ForceSendFields is a list of field names (e.g. "Day") to + // NullFields is a list of field names (e.g. "AttributeKey") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseGuidedSearchResultRefinementAttribute + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo: +// Information describing query expansion including whether expansion +// has occurred. +type GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo struct { + // ExpandedQuery: Bool describing whether query expansion has occurred. + ExpandedQuery bool `json:"expandedQuery,omitempty"` + + // PinnedResultCount: Number of pinned results. This field will only be + // set when expansion happens and + // SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to + // true. + PinnedResultCount int64 `json:"pinnedResultCount,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ExpandedQuery") to // unconditionally include in API requests. By default, fields with // empty or default values are omitted from API requests. However, any // non-pointer, non-interface field appearing in ForceSendFields will be @@ -12407,8 +13336,312 @@ type GoogleTypeDate struct { // This may be used to include empty fields in Patch requests. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API - // requests with the JSON null value. By default, fields with empty + // NullFields is a list of field names (e.g. "ExpandedQuery") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseQueryExpansionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult: +// Represents the search results. +type GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult struct { + // Document: The document data snippet in the search response. Only + // fields that are marked as retrievable are populated. + Document *GoogleCloudDiscoveryengineV1betaDocument `json:"document,omitempty"` + + // Id: Document.id of the searched Document. + Id string `json:"id,omitempty"` + + // ModelScores: Google provided available scores. + ModelScores map[string]GoogleCloudDiscoveryengineV1betaDoubleList `json:"modelScores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Document") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Document") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSearchResult + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummary: Summary of the +// top N search result specified by the summary spec. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummary struct { + // SafetyAttributes: A collection of Safety Attribute categories and + // their associated confidence scores. + SafetyAttributes *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes `json:"safetyAttributes,omitempty"` + + // SummarySkippedReasons: Additional summary-skipped reasons. This + // provides the reason for ignored cases. If nothing is skipped, this + // field is not set. + // + // Possible values: + // "SUMMARY_SKIPPED_REASON_UNSPECIFIED" - Default value. The summary + // skipped reason is not specified. + // "ADVERSARIAL_QUERY_IGNORED" - The adversarial query ignored case. + // Only populated when SummarySpec.ignore_adversarial_query is set to + // `true`. + // "NON_SUMMARY_SEEKING_QUERY_IGNORED" - The non-summary seeking query + // ignored case. Only populated when + // SummarySpec.ignore_non_summary_seeking_query is set to `true`. + // "OUT_OF_DOMAIN_QUERY_IGNORED" - The out-of-domain query ignored + // case. Google skips the summary if there are no high-relevance search + // results. For example, the data store contains facts about company A + // but the user query is asking questions about company B. + // "POTENTIAL_POLICY_VIOLATION" - The potential policy violation case. + // Google skips the summary if there is a potential policy violation + // detected. This includes content that may be violent or toxic. + // "LLM_ADDON_NOT_ENABLED" - The LLM addon not enabled case. Google + // skips the summary if the LLM addon is not enabled. + SummarySkippedReasons []string `json:"summarySkippedReasons,omitempty"` + + // SummaryText: The summary content. + SummaryText string `json:"summaryText,omitempty"` + + // SummaryWithMetadata: Summary with metadata information. + SummaryWithMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata `json:"summaryWithMetadata,omitempty"` + + // ForceSendFields is a list of field names (e.g. "SafetyAttributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SafetyAttributes") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummary) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummary + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation: +// Citation info for a segment. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation struct { + // EndIndex: End of the attributed segment, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + + // Sources: Citation sources for the attributed segment. + Sources []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource `json:"sources,omitempty"` + + // StartIndex: Index indicates the start of the segment, measured in + // bytes/unicode. + StartIndex int64 `json:"startIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndIndex") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata: +// +// Citation metadata. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata struct { + // Citations: Citations for segments. + Citations []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitation `json:"citations,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Citations") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Citations") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource: +// Citation source. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource struct { + // ReferenceIndex: Document reference index from + // SummaryWithMetadata.references. It is 0-indexed and the value will be + // zero if the reference_index is not set explicitly. + ReferenceIndex int64 `json:"referenceIndex,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "ReferenceIndex") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ReferenceIndex") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference: +// Document reference. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference struct { + // ChunkContents: List of cited chunk contents derived from document + // content. + ChunkContents []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent `json:"chunkContents,omitempty"` + + // Document: Required. Document.name of the document. Full resource name + // of the referenced document, in the format + // `projects/*/locations/*/collections/*/dataStores/*/branches/*/document + // s/*`. + Document string `json:"document,omitempty"` + + // Title: Title of the document. + Title string `json:"title,omitempty"` + + // Uri: Cloud Storage or HTTP uri for the document. + Uri string `json:"uri,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ChunkContents") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ChunkContents") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkCon +// tent: Chunk content. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent struct { + // Content: Chunk textual content. + Content string `json:"content,omitempty"` + + // PageIdentifier: Page identifier. + PageIdentifier string `json:"pageIdentifier,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Content") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Content") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReferenceChunkContent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes: +// +// Safety Attribute categories and their associated confidence scores. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes struct { + // Categories: The display names of Safety Attribute categories + // associated with the generated content. Order matches the Scores. + Categories []string `json:"categories,omitempty"` + + // Scores: The confidence scores of the each category, higher value + // means higher confidence. Order matches the Categories. + Scores []float64 `json:"scores,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Categories") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Categories") to include in + // API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. However, any field with an // empty value appearing in NullFields will be sent to the server as // null. It is an error if a field in this list has a non-empty value. @@ -12416,15 +13649,4381 @@ type GoogleTypeDate struct { NullFields []string `json:"-"` } -func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate - raw := NoMethod(*s) - return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySafetyAttributes + var s1 struct { + Scores []gensupport.JSONFloat64 `json:"scores"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Scores = make([]float64, len(s1.Scores)) + for i := range s1.Scores { + s.Scores[i] = float64(s1.Scores[i]) + } + return nil +} + +// GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetada +// ta: Summary with metadata information. +type GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata struct { + // CitationMetadata: Citation metadata for given summary. + CitationMetadata *GoogleCloudDiscoveryengineV1betaSearchResponseSummaryCitationMetadata `json:"citationMetadata,omitempty"` + + // References: Document References. + References []*GoogleCloudDiscoveryengineV1betaSearchResponseSummaryReference `json:"references,omitempty"` + + // Summary: Summary text with no citation information. + Summary string `json:"summary,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CitationMetadata") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CitationMetadata") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSearchResponseSummarySummaryWithMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfig: Configures metadata +// that is used to generate serving time results (e.g. search results or +// recommendation predictions). The ServingConfig is passed in the +// search and predict request and generates results. +type GoogleCloudDiscoveryengineV1betaServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered + // boost controls will be applied. Boost controls must be in the same + // data store as the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + + // DisplayName: Required. The human readable serving config display + // name. Used in Discovery UI. This field must be a UTF-8 encoded string + // with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT + // error is returned. + DisplayName string `json:"displayName,omitempty"` + + // DissociateControlIds: Condition do not associate specifications. If + // multiple do not associate conditions match, all matching do not + // associate controls in the list will execute. Order does not matter. + // Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + + // DiversityLevel: How much diversity to use in recommendation model + // results e.g. `medium-diversity` or `high-diversity`. Currently + // supported values: * `no-diversity` * `low-diversity` * + // `medium-diversity` * `high-diversity` * `auto-diversity` If not + // specified, we choose default based on recommendation model type. + // Default value: `no-diversity`. Can only be set if SolutionType is + // SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + + // EmbeddingConfig: Bring your own embedding config. The config is used + // for search semantic retrieval. The retrieval is based on the dot + // product of SearchRequest.EmbeddingSpec.EmbeddingVector.vector and the + // document embeddings that are provided by this EmbeddingConfig. If + // SearchRequest.EmbeddingSpec.EmbeddingVector.vector is provided, it + // overrides this ServingConfig.embedding_config. + EmbeddingConfig *GoogleCloudDiscoveryengineV1betaEmbeddingConfig `json:"embeddingConfig,omitempty"` + + // FilterControlIds: Filter controls to use in serving path. All + // triggered filter controls will be applied. Filter controls must be in + // the same data store as the serving config. Maximum of 20 filter + // controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig `json:"genericConfig,omitempty"` + + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will + // execute. Order does not matter. Maximum number of specifications is + // 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig `json:"mediaConfig,omitempty"` + + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a + // compatible model (e.g. others-you-may-like CTR to others-you-may-like + // CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/e + // ngines/{engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. + // If multiple oneway synonyms conditions match, all matching oneway + // synonyms controls in the list will execute. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + + // RankingExpression: The ranking expression controls the customized + // ranking on retrieval documents. To leverage this, document embedding + // is required. The ranking expression setting in ServingConfig applies + // to all search requests served by the serving config. However, if + // SearchRequest.ranking_expression is specified, it overrides the + // ServingConfig ranking expression. The ranking expression is a single + // function or multiple functions that are joined by "+". * + // ranking_expression = function, { " + ", function }; Supported + // functions: * double * relevance_score * double * + // dotProduct(embedding_field_path) Function variables: relevance_score: + // pre-defined keywords, used for measure relevance between query and + // document. embedding_field_path: the document embedding field used + // with query embedding vector. dotProduct: embedding function between + // embedding_field_path and query embedding vector. Example ranking + // expression: If document has an embedding field doc_embedding, the + // ranking expression could be 0.5 * relevance_score + 0.3 * + // dotProduct(doc_embedding). + RankingExpression string `json:"rankingExpression,omitempty"` + + // RedirectControlIds: IDs of the redirect controls. Only the first + // triggered redirect action is applied, even if multiple apply. Maximum + // number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can + // not be re-replaced. Maximum number of specifications is 100. Can only + // be set if SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. + // + // Possible values: + // "SOLUTION_TYPE_UNSPECIFIED" - Default value. + // "SOLUTION_TYPE_RECOMMENDATION" - Used for Recommendations AI. + // "SOLUTION_TYPE_SEARCH" - Used for Discovery Search. + // "SOLUTION_TYPE_CHAT" - Used for use cases related to the Generative + // AI agent. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` + // solution. + SolutionType string `json:"solutionType,omitempty"` + + // SynonymsControlIds: Condition synonyms specifications. If multiple + // synonyms conditions match, all matching synonyms controls in the list + // will execute. Maximum number of specifications is 100. Can only be + // set if SolutionType is SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + + // UpdateTime: Output only. ServingConfig updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "BoostControlIds") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BoostControlIds") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig: Specifies +// the configurations needed for Generic Discovery.Currently we support: +// * `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. + // Only valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ContentSearchSpec") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigGenericConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig: Specifies +// the configurations needed for Media Discovery. Currently we support: +// * `demote_content_watched`: Threshold for watched content demotion. +// Customers can specify if using watched content demotion or use viewed +// detail page. Using the content watched demotion, customers need to +// specify the watched minutes or percentage exceeds the threshold, the +// content will be demoted in the recommendation result. * +// `promote_fresh_content`: cutoff days for fresh content promotion. +// Customers can specify if using content freshness promotion. If the +// content was published within the cutoff days, the content will be +// promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were + // published for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + + // ContentWatchedPercentageThreshold: Specifies the content watched + // percentage threshold for demotion. Threshold value must be between + // [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + + // DemotionEventType: Specifies the event type used for demoting + // recommendation result. Currently supported values: * `view-item`: + // Item viewed. * `media-play`: Start/resume watching a video, playing a + // song, etc. * `media-complete`: Finished or stopped midway through a + // video, song, etc. If unset, watch history demotion will not be + // applied. Content freshness demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted + // from API requests. However, any non-pointer, non-interface field + // appearing in ForceSendFields will be sent to the server regardless of + // whether the field is empty or not. This may be used to include empty + // fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. + // "ContentFreshnessCutoffDays") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted + // from API requests. However, any field with an empty value appearing + // in NullFields will be sent to the server as null. It is an error if a + // field in this list has a non-empty value. This may be used to include + // null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + +// GoogleCloudDiscoveryengineV1betaSession: External session proto +// definition. +type GoogleCloudDiscoveryengineV1betaSession struct { + // EndTime: Output only. The time the session finished. + EndTime string `json:"endTime,omitempty"` + + // Name: Immutable. Fully qualified name + // `project/*/locations/global/collections/{collection}/engines/{engine}/ + // sessions/*` + Name string `json:"name,omitempty"` + + // StartTime: Output only. The time the session started. + StartTime string `json:"startTime,omitempty"` + + // State: The state of the session. + // + // Possible values: + // "STATE_UNSPECIFIED" - State is unspecified. + // "IN_PROGRESS" - The session is currently open. + State string `json:"state,omitempty"` + + // Turns: Turns. + Turns []*GoogleCloudDiscoveryengineV1betaSessionTurn `json:"turns,omitempty"` + + // UserPseudoId: A unique identifier for tracking users. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "EndTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "EndTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSession) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSession + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSessionTurn: Represents a turn, +// including a query from the user and a answer from service. +type GoogleCloudDiscoveryengineV1betaSessionTurn struct { + // Answer: The resource name of the answer to the user query. + Answer string `json:"answer,omitempty"` + + // Query: The user query. + Query *GoogleCloudDiscoveryengineV1betaQuery `json:"query,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Answer") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Answer") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSessionTurn) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSessionTurn + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteSearchEngine: SiteSearchEngine +// captures DataStore level site search persisting configurations. It is +// a singleton value per data store. +type GoogleCloudDiscoveryengineV1betaSiteSearchEngine struct { + // Name: The fully qualified resource name of the site search engine. + // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine` + Name string `json:"name,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Name") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Name") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSiteSearchEngine) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteSearchEngine + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSiteVerificationInfo: Verification +// information for target sites in advanced site search. +type GoogleCloudDiscoveryengineV1betaSiteVerificationInfo struct { + // SiteVerificationState: Site verification state indicating the + // ownership and validity. + // + // Possible values: + // "SITE_VERIFICATION_STATE_UNSPECIFIED" - Defaults to VERIFIED. + // "VERIFIED" - Site ownership verified. + // "UNVERIFIED" - Site ownership pending verification or verification + // failed. + // "EXEMPTED" - Site exempt from verification, e.g., a public website + // that opens to all. + SiteVerificationState string `json:"siteVerificationState,omitempty"` + + // VerifyTime: Latest site verification time. + VerifyTime string `json:"verifyTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. + // "SiteVerificationState") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. However, any non-pointer, non-interface field appearing in + // ForceSendFields will be sent to the server regardless of whether the + // field is empty or not. This may be used to include empty fields in + // Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "SiteVerificationState") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSiteVerificationInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSpannerSource: The Spanner source for +// importing data +type GoogleCloudDiscoveryengineV1betaSpannerSource struct { + // DatabaseId: Required. The database ID of the source Spanner table. + DatabaseId string `json:"databaseId,omitempty"` + + // EnableDataBoost: Whether to apply data boost on Spanner export. + // Enabling this option will incur additional cost. More info can be + // found here + // (https://cloud.google.com/spanner/docs/databoost/databoost-overview#billing_and_quotas). + EnableDataBoost bool `json:"enableDataBoost,omitempty"` + + // InstanceId: Required. The instance ID of the source Spanner table. + InstanceId string `json:"instanceId,omitempty"` + + // ProjectId: The project ID that the Spanner source is in with a length + // limit of 128 characters. If not specified, inherits the project ID + // from the parent request. + ProjectId string `json:"projectId,omitempty"` + + // TableId: Required. The table name of the Spanner database that needs + // to be imported. + TableId string `json:"tableId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "DatabaseId") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "DatabaseId") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSpannerSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSpannerSource + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry: Suggestion +// deny list entry identifying the phrase to block from suggestions and +// the applied operation for the phrase. +type GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry struct { + // BlockPhrase: Required. Phrase to block from suggestions served. Can + // be maximum 125 characters. + BlockPhrase string `json:"blockPhrase,omitempty"` + + // MatchOperator: Required. The match operator to apply for this phrase. + // Whether to block the exact phrase, or block any suggestions + // containing this phrase. + // + // Possible values: + // "MATCH_OPERATOR_UNSPECIFIED" - Default value. Should not be used + // "EXACT_MATCH" - If the suggestion is an exact match to the + // block_phrase, then block it. + // "CONTAINS" - If the suggestion contains the block_phrase, then + // block it. + MatchOperator string `json:"matchOperator,omitempty"` + + // ForceSendFields is a list of field names (e.g. "BlockPhrase") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "BlockPhrase") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaSuggestionDenyListEntry + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSite: A target site for the +// SiteSearchEngine. +type GoogleCloudDiscoveryengineV1betaTargetSite struct { + // ExactMatch: Input only. If set to false, a uri_pattern is generated + // to include all pages whose address contains the provided_uri_pattern. + // If set to true, an uri_pattern is generated to try to be an exact + // match of the provided_uri_pattern or just the specific page if the + // provided_uri_pattern is a specific one. provided_uri_pattern is + // always normalized to generate the URI pattern to be used by the + // search engine. + ExactMatch bool `json:"exactMatch,omitempty"` + + // FailureReason: Output only. Failure reason. + FailureReason *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason `json:"failureReason,omitempty"` + + // GeneratedUriPattern: Output only. This is system-generated based on + // the provided_uri_pattern. + GeneratedUriPattern string `json:"generatedUriPattern,omitempty"` + + // IndexingStatus: Output only. Indexing status. + // + // Possible values: + // "INDEXING_STATUS_UNSPECIFIED" - Defaults to SUCCEEDED. + // "PENDING" - The target site is in the update queue and will be + // picked up by indexing pipeline. + // "FAILED" - The target site fails to be indexed. + // "SUCCEEDED" - The target site has been indexed. + // "DELETING" - The previously indexed target site has been marked to + // be deleted. This is a transitioning state which will resulted in + // either: 1. target site deleted if unindexing is successful; 2. state + // reverts to SUCCEEDED if the unindexing fails. + IndexingStatus string `json:"indexingStatus,omitempty"` + + // Name: Output only. The fully qualified resource name of the target + // site. + // `projects/{project}/locations/{location}/collections/{collection}/data + // Stores/{data_store}/siteSearchEngine/targetSites/{target_site}` The + // `target_site_id` is system-generated. + Name string `json:"name,omitempty"` + + // ProvidedUriPattern: Required. Input only. The user provided URI + // pattern from which the `generated_uri_pattern` is generated. + ProvidedUriPattern string `json:"providedUriPattern,omitempty"` + + // SiteVerificationInfo: Output only. Site ownership and validity + // verification status. + SiteVerificationInfo *GoogleCloudDiscoveryengineV1betaSiteVerificationInfo `json:"siteVerificationInfo,omitempty"` + + // Type: The type of the target site, e.g., whether the site is to be + // included or excluded. + // + // Possible values: + // "TYPE_UNSPECIFIED" - This value is unused. In this case, server + // behavior defaults to Type.INCLUDE. + // "INCLUDE" - Include the target site. + // "EXCLUDE" - Exclude the target site. + Type string `json:"type,omitempty"` + + // UpdateTime: Output only. The target site's last updated time. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "ExactMatch") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ExactMatch") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSite) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSite + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason: Site search +// indexing failure reasons. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason struct { + // QuotaFailure: Failed due to insufficient quota. + QuotaFailure *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure `json:"quotaFailure,omitempty"` + + // ForceSendFields is a list of field names (e.g. "QuotaFailure") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "QuotaFailure") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReason + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure: +// Failed due to insufficient quota. +type GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure struct { + // TotalRequiredQuota: This number is an estimation on how much total + // quota this project needs to successfully complete indexing. + TotalRequiredQuota int64 `json:"totalRequiredQuota,omitempty,string"` + + // ForceSendFields is a list of field names (e.g. "TotalRequiredQuota") + // to unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "TotalRequiredQuota") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTargetSiteFailureReasonQuotaFailure + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTextInput: Defines text input. +type GoogleCloudDiscoveryengineV1betaTextInput struct { + // Context: Conversation context of the input. + Context *GoogleCloudDiscoveryengineV1betaConversationContext `json:"context,omitempty"` + + // Input: Text input. + Input string `json:"input,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Context") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Context") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTextInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTextInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata: Metadata +// related to the progress of the TrainCustomModel operation. This is +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest: Request +// message for SearchTuningService.TrainCustomModel method. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest struct { + // ErrorConfig: The desired location of errors incurred during the data + // ingestion and training. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // GcsTrainingInput: Cloud Storage training input. + GcsTrainingInput *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput `json:"gcsTrainingInput,omitempty"` + + // ModelType: Model to be trained. Supported values are: * + // **search-tuning**: Fine tuning the search system based on data + // provided. + ModelType string `json:"modelType,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInpu +// t: Cloud Storage training data input. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput struct { + // CorpusDataPath: The Cloud Storage corpus data which could be + // associated in train data. The data path format is `gs:///`. A newline + // delimited jsonl/ndjson file. For search-tuning model, each line + // should have the _id, title and text. Example: `{"_id": "doc1", title: + // "relevant doc", "text": "relevant text"}` + CorpusDataPath string `json:"corpusDataPath,omitempty"` + + // QueryDataPath: The gcs query data which could be associated in train + // data. The data path format is `gs:///`. A newline delimited + // jsonl/ndjson file. For search-tuning model, each line should have the + // _id and text. Example: {"_id": "query1", "text": "example query"} + QueryDataPath string `json:"queryDataPath,omitempty"` + + // TestDataPath: Cloud Storage test data. Same format as + // train_data_path. If not provided, a random 80/20 train/test split + // will be performed on train_data_path. + TestDataPath string `json:"testDataPath,omitempty"` + + // TrainDataPath: Cloud Storage training data path whose format should + // be `gs:///`. The file should be in tsv format. Each line should have + // the doc_id and query_id and score (number). For search-tuning model, + // it should have the query-id corpus-id score as tsv file header. The + // score should be a number in `[0, inf+)`. The larger the number is, + // the more relevant the pair is. Example: * + // `query-id\tcorpus-id\tscore` * `query1\tdoc1\t1` + TrainDataPath string `json:"trainDataPath,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CorpusDataPath") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CorpusDataPath") to + // include in API requests with the JSON null value. By default, fields + // with empty values are omitted from API requests. However, any field + // with an empty value appearing in NullFields will be sent to the + // server as null. It is an error if a field in this list has a + // non-empty value. This may be used to include null fields in Patch + // requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelRequestGcsTrainingInput + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse: Response of +// the TrainCustomModelRequest. This message is returned by the +// google.longrunning.Operations.response field. +type GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse struct { + // ErrorConfig: Echoes the destination for the complete errors in the + // request if set. + ErrorConfig *GoogleCloudDiscoveryengineV1betaImportErrorConfig `json:"errorConfig,omitempty"` + + // ErrorSamples: A sample of errors encountered while processing the + // data. + ErrorSamples []*GoogleRpcStatus `json:"errorSamples,omitempty"` + + // Metrics: The metrics of the trained model. + Metrics map[string]float64 `json:"metrics,omitempty"` + + // ModelStatus: The trained model status. Possible values are: * + // **bad-data**: The training data quality is bad. * **no-improvement**: + // Tuning didn't improve performance. Won't deploy. * **in-progress**: + // Model training job creation is in progress. * **training**: Model is + // actively training. * **evaluating**: The model is evaluating trained + // metrics. * **indexing**: The model trained metrics are indexing. * + // **ready**: The model is ready for serving. + ModelStatus string `json:"modelStatus,omitempty"` + + // ForceSendFields is a list of field names (e.g. "ErrorConfig") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "ErrorConfig") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTrainCustomModelResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTransactionInfo: A transaction +// represents the entire purchase transaction. +type GoogleCloudDiscoveryengineV1betaTransactionInfo struct { + // Cost: All the costs associated with the products. These can be + // manufacturing costs, shipping expenses not borne by the end user, or + // any other costs, such that: * Profit = value - tax - cost + Cost float64 `json:"cost,omitempty"` + + // Currency: Required. Currency code. Use three-character ISO-4217 code. + Currency string `json:"currency,omitempty"` + + // DiscountValue: The total discount(s) value applied to this + // transaction. This figure should be excluded from + // TransactionInfo.value For example, if a user paid + // TransactionInfo.value amount, then nominal (pre-discount) value of + // the transaction is the sum of TransactionInfo.value and + // TransactionInfo.discount_value This means that profit is calculated + // the same way, regardless of the discount value, and that + // TransactionInfo.discount_value can be larger than + // TransactionInfo.value: * Profit = value - tax - cost + DiscountValue float64 `json:"discountValue,omitempty"` + + // Tax: All the taxes associated with the transaction. + Tax float64 `json:"tax,omitempty"` + + // TransactionId: The transaction ID with a length limit of 128 + // characters. + TransactionId string `json:"transactionId,omitempty"` + + // Value: Required. Total non-zero value associated with the + // transaction. This value may include shipping, tax, or other + // adjustments to the total value that you want to include. + Value float64 `json:"value,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Cost") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Cost") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaTransactionInfo) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaTransactionInfo + var s1 struct { + Cost gensupport.JSONFloat64 `json:"cost"` + DiscountValue gensupport.JSONFloat64 `json:"discountValue"` + Tax gensupport.JSONFloat64 `json:"tax"` + Value gensupport.JSONFloat64 `json:"value"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Cost = float64(s1.Cost) + s.DiscountValue = float64(s1.DiscountValue) + s.Tax = float64(s1.Tax) + s.Value = float64(s1.Value) + return nil +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineMetadata: Metadata +// associated with a tune operation. +type GoogleCloudDiscoveryengineV1betaTuneEngineMetadata struct { + // Engine: Required. The resource name of the engine that this tune + // applies to. Format: + // `projects/{project_number}/locations/{location_id}/collections/{collec + // tion_id}/engines/{engine_id}` + Engine string `json:"engine,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Engine") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Engine") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaTuneEngineMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaTuneEngineMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaTuneEngineRequest: Request to +// manually start a tuning process now (instead of waiting for the +// periodically scheduled tuning to happen). +type GoogleCloudDiscoveryengineV1betaTuneEngineRequest struct { +} + +// GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata: Metadata for +// UpdateSchema LRO. +type GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateSchemaMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata: Metadata +// related to the progress of the +// SiteSearchEngineService.UpdateTargetSite operation. This will be +// returned by the google.longrunning.Operation.metadata field. +type GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata struct { + // CreateTime: Operation create time. + CreateTime string `json:"createTime,omitempty"` + + // UpdateTime: Operation last update time. If the operation is done, + // this is also the finish time. + UpdateTime string `json:"updateTime,omitempty"` + + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "CreateTime") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUpdateTargetSiteMetadata + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserEvent: UserEvent captures all +// metadata information Discovery Engine API needs to know about how end +// users interact with customers' website. +type GoogleCloudDiscoveryengineV1betaUserEvent struct { + // Attributes: Extra user event features to include in the + // recommendation model. These attributes must NOT contain data that + // needs to be parsed or processed further, e.g. JSON or other + // encodings. If you provide custom attributes for ingested user events, + // also include them in the user events that you associate with + // prediction requests. Custom attribute formatting must be consistent + // between imported events and events provided with prediction requests. + // This lets the Discovery Engine API use those custom attributes when + // training models and serving predictions, which helps improve + // recommendation quality. This field needs to pass all below criteria, + // otherwise an `INVALID_ARGUMENT` error is returned: * The key must be + // a UTF-8 encoded string with a length limit of 5,000 characters. * For + // text attributes, at most 400 values are allowed. Empty values are not + // allowed. Each value must be a UTF-8 encoded string with a length + // limit of 256 characters. * For number attributes, at most 400 values + // are allowed. For product recommendations, an example of extra user + // information is `traffic_channel`, which is how a user arrives at the + // site. Users can arrive at the site by coming to the site directly, + // coming through Google search, or in other ways. + Attributes map[string]GoogleCloudDiscoveryengineV1betaCustomAttribute `json:"attributes,omitempty"` + + // AttributionToken: Token to attribute an API response to user + // action(s) to trigger the event. Highly recommended for user events + // that are the result of RecommendationService.Recommend. This field + // enables accurate attribution of recommendation model performance. The + // value must be one of: * RecommendResponse.attribution_token for + // events that are the result of RecommendationService.Recommend. * + // SearchResponse.attribution_token for events that are the result of + // SearchService.Search. This token enables us to accurately attribute + // page view or conversion completion back to the event and the + // particular predict response containing this clicked/purchased + // product. If user clicks on product K in the recommendation results, + // pass RecommendResponse.attribution_token as a URL parameter to + // product K's page. When recording events on product K's page, log the + // RecommendResponse.attribution_token to this field. + AttributionToken string `json:"attributionToken,omitempty"` + + // CompletionInfo: CompletionService.CompleteQuery details related to + // the event. This field should be set for `search` event when + // autocomplete function is enabled and the user clicks a suggestion for + // search. + CompletionInfo *GoogleCloudDiscoveryengineV1betaCompletionInfo `json:"completionInfo,omitempty"` + + // DirectUserRequest: Should set to true if the request is made directly + // from the end user, in which case the UserEvent.user_info.user_agent + // can be populated from the HTTP request. This flag should be set only + // if the API request is made directly from the end user such as a + // mobile app (and not if a gateway or a server is processing and + // pushing the user events). This should not be set when using the + // JavaScript tag in UserEventService.CollectUserEvent. + DirectUserRequest bool `json:"directUserRequest,omitempty"` + + // Documents: List of Documents associated with this user event. This + // field is optional except for the following event types: * `view-item` + // * `add-to-cart` * `purchase` * `media-play` * `media-complete` In a + // `search` event, this field represents the documents returned to the + // end user on the current page (the end user may have not finished + // browsing the whole page yet). When a new page is returned to the end + // user, after pagination/filtering/ordering even for the same query, a + // new `search` event with different UserEvent.documents is desired. + Documents []*GoogleCloudDiscoveryengineV1betaDocumentInfo `json:"documents,omitempty"` + + // EventTime: Only required for UserEventService.ImportUserEvents + // method. Timestamp of when the user event happened. + EventTime string `json:"eventTime,omitempty"` + + // EventType: Required. User event type. Allowed values are: Generic + // values: * `search`: Search for Documents. * `view-item`: Detailed + // page view of a Document. * `view-item-list`: View of a panel or + // ordered list of Documents. * `view-home-page`: View of the home page. + // * `view-category-page`: View of a category page, e.g. Home > Men > + // Jeans Retail-related values: * `add-to-cart`: Add an item(s) to cart, + // e.g. in Retail online shopping * `purchase`: Purchase an item(s) + // Media-related values: * `media-play`: Start/resume watching a video, + // playing a song, etc. * `media-complete`: Finished or stopped midway + // through a video, song, etc. + EventType string `json:"eventType,omitempty"` + + // Filter: The filter syntax consists of an expression language for + // constructing a predicate from one or more fields of the documents + // being filtered. One example is for `search` events, the associated + // SearchRequest may contain a filter expression in SearchRequest.filter + // conforming to https://google.aip.dev/160#filtering. Similarly, for + // `view-item-list` events that are generated from a RecommendRequest, + // this field may be populated directly from RecommendRequest.filter + // conforming to https://google.aip.dev/160#filtering. The value must be + // a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. + Filter string `json:"filter,omitempty"` + + // MediaInfo: Media-specific info. + MediaInfo *GoogleCloudDiscoveryengineV1betaMediaInfo `json:"mediaInfo,omitempty"` + + // PageInfo: Page metadata such as categories and other critical + // information for certain event types such as `view-category-page`. + PageInfo *GoogleCloudDiscoveryengineV1betaPageInfo `json:"pageInfo,omitempty"` + + // Panel: Panel metadata associated with this user event. + Panel *GoogleCloudDiscoveryengineV1betaPanelInfo `json:"panel,omitempty"` + + // PromotionIds: The promotion IDs if this is an event associated with + // promotions. Currently, this field is restricted to at most one ID. + PromotionIds []string `json:"promotionIds,omitempty"` + + // SearchInfo: SearchService.Search details related to the event. This + // field should be set for `search` event. + SearchInfo *GoogleCloudDiscoveryengineV1betaSearchInfo `json:"searchInfo,omitempty"` + + // SessionId: A unique identifier for tracking a visitor session with a + // length limit of 128 bytes. A session is an aggregation of an end user + // behavior in a time span. A general guideline to populate the + // session_id: 1. If user has no activity for 30 min, a new session_id + // should be assigned. 2. The session_id should be unique across users, + // suggest use uuid or add UserEvent.user_pseudo_id as prefix. + SessionId string `json:"sessionId,omitempty"` + + // TagIds: A list of identifiers for the independent experiment groups + // this user event belongs to. This is used to distinguish between user + // events associated with different experiment setups on the customer + // end. + TagIds []string `json:"tagIds,omitempty"` + + // TransactionInfo: The transaction metadata (if any) associated with + // this user event. + TransactionInfo *GoogleCloudDiscoveryengineV1betaTransactionInfo `json:"transactionInfo,omitempty"` + + // UserInfo: Information about the end user. + UserInfo *GoogleCloudDiscoveryengineV1betaUserInfo `json:"userInfo,omitempty"` + + // UserPseudoId: Required. A unique identifier for tracking visitors. + // For example, this could be implemented with an HTTP cookie, which + // should be able to uniquely identify a visitor on a single device. + // This unique identifier should not change if the visitor log in/out of + // the website. Do not set the field to the same fixed ID for different + // users. This mixes the event history of those users together, which + // results in degraded model quality. The field must be a UTF-8 encoded + // string with a length limit of 128 characters. Otherwise, an + // `INVALID_ARGUMENT` error is returned. The field should not contain + // PII or user-data. We recommend to use Google Analytics Client ID + // (https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) + // for this field. + UserPseudoId string `json:"userPseudoId,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Attributes") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Attributes") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUserEvent) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserEvent + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1betaUserInfo: Information of an end user. +type GoogleCloudDiscoveryengineV1betaUserInfo struct { + // UserAgent: User agent as included in the HTTP header. The field must + // be a UTF-8 encoded string with a length limit of 1,000 characters. + // Otherwise, an `INVALID_ARGUMENT` error is returned. This should not + // be set when using the client side event reporting with GTM or + // JavaScript tag in UserEventService.CollectUserEvent or if + // UserEvent.direct_user_request is set. + UserAgent string `json:"userAgent,omitempty"` + + // UserId: Highly recommended for logged-in users. Unique identifier for + // logged-in user, such as a user name. Don't set for anonymous users. + // Always use a hashed value for this ID. Don't set the field to the + // same fixed ID for different users. This mixes the event history of + // those users together, which results in degraded model quality. The + // field must be a UTF-8 encoded string with a length limit of 128 + // characters. Otherwise, an `INVALID_ARGUMENT` error is returned. + UserId string `json:"userId,omitempty"` + + // ForceSendFields is a list of field names (e.g. "UserAgent") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "UserAgent") to include in + // API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleCloudDiscoveryengineV1betaUserInfo) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaUserInfo + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningListOperationsResponse: The response message for +// Operations.ListOperations. +type GoogleLongrunningListOperationsResponse struct { + // NextPageToken: The standard List next-page token. + NextPageToken string `json:"nextPageToken,omitempty"` + + // Operations: A list of operations that matches the specified filter in + // the request. + Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "NextPageToken") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "NextPageToken") to include + // in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. However, any field with + // an empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleLongrunningOperation: This resource represents a long-running +// operation that is the result of a network API call. +type GoogleLongrunningOperation struct { + // Done: If the value is `false`, it means the operation is still in + // progress. If `true`, the operation is completed, and either `error` + // or `response` is available. + Done bool `json:"done,omitempty"` + + // Error: The error result of the operation in case of failure or + // cancellation. + Error *GoogleRpcStatus `json:"error,omitempty"` + + // Metadata: Service-specific metadata associated with the operation. It + // typically contains progress information and common metadata such as + // create time. Some services might not provide such metadata. Any + // method that returns a long-running operation should document the + // metadata type, if any. + Metadata googleapi.RawMessage `json:"metadata,omitempty"` + + // Name: The server-assigned name, which is only unique within the same + // service that originally returns it. If you use the default HTTP + // mapping, the `name` should be a resource name ending with + // `operations/{unique_id}`. + Name string `json:"name,omitempty"` + + // Response: The normal, successful response of the operation. If the + // original method returns no data on success, such as `Delete`, the + // response is `google.protobuf.Empty`. If the original method is + // standard `Get`/`Create`/`Update`, the response should be the + // resource. For other methods, the response should have the type + // `XxxResponse`, where `Xxx` is the original method name. For example, + // if the original method name is `TakeSnapshot()`, the inferred + // response type is `TakeSnapshotResponse`. + Response googleapi.RawMessage `json:"response,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` + + // ForceSendFields is a list of field names (e.g. "Done") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Done") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleProtobufEmpty: A generic empty message that you can re-use to +// avoid defining duplicated empty messages in your APIs. A typical +// example is to use it as the request or the response type of an API +// method. For instance: service Foo { rpc Bar(google.protobuf.Empty) +// returns (google.protobuf.Empty); } +type GoogleProtobufEmpty struct { + // ServerResponse contains the HTTP response code and headers from the + // server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleRpcStatus: The `Status` type defines a logical error model that +// is suitable for different programming environments, including REST +// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each +// `Status` message contains three pieces of data: error code, error +// message, and error details. You can find out more about this error +// model and how to work with it in the API Design Guide +// (https://cloud.google.com/apis/design/errors). +type GoogleRpcStatus struct { + // Code: The status code, which should be an enum value of + // google.rpc.Code. + Code int64 `json:"code,omitempty"` + + // Details: A list of messages that carry the error details. There is a + // common set of message types for APIs to use. + Details []googleapi.RawMessage `json:"details,omitempty"` + + // Message: A developer-facing error message, which should be in + // English. Any user-facing error message should be localized and sent + // in the google.rpc.Status.details field, or localized by the client. + Message string `json:"message,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Code") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Code") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as +// a birthday. The time of day and time zone are either specified +// elsewhere or are insignificant. The date is relative to the Gregorian +// Calendar. This can represent one of the following: * A full date, +// with non-zero year, month, and day values. * A month and day, with a +// zero year (for example, an anniversary). * A year on its own, with a +// zero month and a zero day. * A year and month, with a zero day (for +// example, a credit card expiration date). Related types: * +// google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and + // month, or 0 to specify a year by itself or a year and month where the + // day isn't significant. + Day int64 `json:"day,omitempty"` + + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year + // without a month and day. + Month int64 `json:"month,omitempty"` + + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a + // date without a year. + Year int64 `json:"year,omitempty"` + + // ForceSendFields is a list of field names (e.g. "Day") to + // unconditionally include in API requests. By default, fields with + // empty or default values are omitted from API requests. However, any + // non-pointer, non-interface field appearing in ForceSendFields will be + // sent to the server regardless of whether the field is empty or not. + // This may be used to include empty fields in Patch requests. + ForceSendFields []string `json:"-"` + + // NullFields is a list of field names (e.g. "Day") to include in API + // requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. However, any field with an + // empty value appearing in NullFields will be sent to the server as + // null. It is an error if a field in this list has a non-empty value. + // This may be used to include null fields in Patch requests. + NullFields []string `json:"-"` +} + +func (s *GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + raw := NoMethod(*s) + return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) +} + +// method id "discoveryengine.projects.locations.collections.dataConnector.operations.get": + +type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. +// +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "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}/dataConnector/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataConnector.operations.list": + +type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. +// +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningListOperationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "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}/dataConnector/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataConnector.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/[^/]+/dataConnector$", + // "required": true, + // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}/operations", + // "response": { + // "$ref": "GoogleLongrunningListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": + +type ProjectsLocationsCollectionsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword +// suggestions. +// +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions +// generated from the past history of SearchService.Search API calls. Do +// not use it when there is no traffic for Search API. * `user-event` - +// Using suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+dataStore}:completeQuery", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.create": + +type ProjectsLocationsCollectionsDataStoresCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a DataStore. DataStore is for storing Documents. To +// serve these documents for Search, or Recommendation use case, an +// Engine needs to be created separately. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { + c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/dataStores", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.delete": + +type ProjectsLocationsCollectionsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.get": + +type ProjectsLocationsCollectionsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a DataStore. +// +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { + c := &ProjectsLocationsCollectionsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine": + +type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetSiteSearchEngine: Gets the SiteSearchEngine. +// +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade +// r or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.list": + +type ProjectsLocationsCollectionsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStores under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { + c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// DataStores to return. If unspecified, defaults to 10. The maximum +// allowed value is 50. Values above 50 will be coerced to 50. If this +// field is negative, an INVALID_ARGUMENT is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/dataStores", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.dataStores.patch": + +type ProjectsLocationsCollectionsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DataStore +// +// - name: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { + c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a DataStore", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.trainCustomModel": + +type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { + s *Service + dataStore string + googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TrainCustomModel: Trains a custom model. +// +// - dataStore: The resource name of the Data Store, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. This field is used to identify the data +// store where to train the models. +func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + c.googleclouddiscoveryenginev1betatraincustommodelrequest = googleclouddiscoveryenginev1betatraincustommodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatraincustommodelrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:trainCustomModel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Trains a custom model.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+dataStore}:trainCustomModel", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Document. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleProtobufEmpty{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleProtobufEmpty" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Document. +// +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Gets a list of Documents. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a list of Documents.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Document. +// +// - name: Immutable. The full resource name of the document. Format: +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, + // "name": { + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": + +type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Permanently deletes all selected Documents in a branch. This +// process is asynchronous. Depending on the number of Documents to be +// deleted, this operation can take hours to complete. Before the delete +// operation completes, some Documents might still be returned by +// DocumentService.GetDocument or DocumentService.ListDocuments. To get +// a list of the Documents to be deleted, set +// PurgeDocumentsRequest.force to false. +// +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "discoveryengine.projects.locations.collections.dataConnector.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": -type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12438,8 +18037,8 @@ type ProjectsLocationsCollectionsDataConnectorOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12447,7 +18046,7 @@ func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12457,7 +18056,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Fields(s .. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -12465,21 +18064,21 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) IfNoneMatch // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12505,14 +18104,14 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12544,9 +18143,9 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", // "parameterOrder": [ // "name" // ], @@ -12554,7 +18153,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -12570,9 +18169,9 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsGetCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataConnector.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": -type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12586,29 +18185,29 @@ type ProjectsLocationsCollectionsDataConnectorOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataConnectorOperationsService) List(name string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { - c := &ProjectsLocationsCollectionsDataConnectorOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12616,7 +18215,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12626,7 +18225,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Fields(s . // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -12634,21 +18233,21 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataConnectorOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -12674,7 +18273,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataConnector.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -12682,7 +18281,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) doRequest( // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12714,9 +18313,9 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataConnector/operations", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataConnector.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.list", // "parameterOrder": [ // "name" // ], @@ -12729,7 +18328,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Do(opts .. // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataConnector$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // }, @@ -12759,7 +18358,7 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) 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 *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -12777,150 +18376,245 @@ func (c *ProjectsLocationsCollectionsDataConnectorOperationsListCall) Pages(ctx } } -// method id "discoveryengine.projects.locations.collections.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": -type ProjectsLocationsCollectionsDataStoresCompleteQueryCall 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 } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// Converse: Converses a conversation. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsCollectionsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c := &ProjectsLocationsCollectionsDataStoresCompleteQueryCall{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/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { + c.ctx_ = ctx return c } -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions -// generated from the past history of SearchService.Search API calls. Do -// not use it when there is no traffic for Search API. * `user-event` - -// Using suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Converses a conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": + +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/{coll +// ection}/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 information. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + 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{ - "dataStore": c.dataStore, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.completeQuery" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, 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 { @@ -12939,7 +18633,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12951,45 +18645,28 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:completeQuery", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.completeQuery", + // "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}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", // "parameterOrder": [ - // "dataStore" + // "parent" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "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/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", - // "location": "query", - // "type": "boolean" - // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", - // "location": "query", - // "type": "string" - // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+dataStore}:completeQuery", + // "path": "v1beta/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -12998,54 +18675,32 @@ func (c *ProjectsLocationsCollectionsDataStoresCompleteQueryCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.create": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": -type ProjectsLocationsCollectionsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsCollectionsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresCreateCall { - c := &ProjectsLocationsCollectionsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) - return c -} - -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsCollectionsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13053,21 +18708,21 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Fields(s ...googleapi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13075,34 +18730,29 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) doRequest(alt string) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -13121,7 +18771,7 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. 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, @@ -13133,38 +18783,25 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.create", + // "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}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "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/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/dataStores", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13173,26 +18810,24 @@ func (c *ProjectsLocationsCollectionsDataStoresCreateCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.collections.dataStores.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": -type ProjectsLocationsCollectionsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresConversationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Get: Gets a Conversation. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *ProjectsLocationsCollectionsDataStoresDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -13200,41 +18835,54 @@ func (r *ProjectsLocationsCollectionsDataStoresService) Delete(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -13245,14 +18893,16 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13271,7 +18921,7 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. 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, @@ -13283,25 +18933,25 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.delete", + // "description": "Gets a Conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "description": "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13310,35 +18960,66 @@ func (c *ProjectsLocationsCollectionsDataStoresDeleteCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.collections.dataStores.get": +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": -type ProjectsLocationsCollectionsDataStoresGetCall struct { +type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a DataStore. +// List: Lists all Conversations by their parent DataStore. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) Get(name string) *ProjectsLocationsCollectionsDataStoresGetCall { - c := &ProjectsLocationsCollectionsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13348,7 +19029,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -13356,21 +19037,21 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13383,7 +19064,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13391,21 +19072,22 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) 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.dataStores.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +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 { @@ -13424,7 +19106,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13436,25 +19118,46 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "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/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13463,81 +19166,106 @@ func (c *ProjectsLocationsCollectionsDataStoresGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": + +type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// 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: Resource name of SiteSearchEngine, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresConversationsPatchCall{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 *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 information. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -13548,16 +19276,16 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade -// r or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, 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 { @@ -13576,7 +19304,7 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13588,25 +19316,34 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.getSiteSearchEngine", + // "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}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13615,61 +19352,32 @@ func (c *ProjectsLocationsCollectionsDataStoresGetSiteSearchEngineCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.list": +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": -type ProjectsLocationsCollectionsDataStoresListCall struct { +type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// `. If the caller does not have permission to list DataStores under -// this location, regardless of whether or not this data store exists, -// a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresService) List(parent string) *ProjectsLocationsCollectionsDataStoresListCall { - c := &ProjectsLocationsCollectionsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter by solution type. -// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' -func (c *ProjectsLocationsCollectionsDataStoresListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// DataStores to return. If unspecified, defaults to 10. The maximum -// allowed value is 50. Values above 50 will be coerced to 50. If this -// field is negative, an INVALID_ARGUMENT is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDataStoresResponse.next_page_token, received from a previous -// DataStoreService.ListDataStores call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DataStoreService.ListDataStores must match the call that provided the -// page token. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13679,7 +19387,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Fields(s ...googleapi.F // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -13687,21 +19395,21 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) IfNoneMatch(entityTag s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresListCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -13714,7 +19422,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) ( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "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 { @@ -13722,22 +19430,19 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) doRequest(alt string) ( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13756,7 +19461,7 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13768,41 +19473,25 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/dataStores", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13811,102 +19500,100 @@ func (c *ProjectsLocationsCollectionsDataStoresListCall) Do(opts ...googleapi.Ca } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": + +type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.collections.dataStores.patch": +// 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} -type ProjectsLocationsCollectionsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -// Patch: Updates a DataStore -// -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsCollectionsDataStoresPatchCall { - c := &ProjectsLocationsCollectionsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore +// 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 } -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DataStore to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -13917,16 +19604,15 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13945,7 +19631,7 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13957,34 +19643,41 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.patch", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -13993,91 +19686,118 @@ func (c *ProjectsLocationsCollectionsDataStoresPatchCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.collections.dataStores.trainCustomModel": +// Pages invokes f for each page of results. +// 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")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresTrainCustomModelCall struct { - s *Service - dataStore string - googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": + +type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TrainCustomModel: Trains a custom model. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - dataStore: The resource name of the Data Store, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. This field is used to identify the data -// store where to train the models. -func (r *ProjectsLocationsCollectionsDataStoresService) TrainCustomModel(dataStore string, googleclouddiscoveryenginev1betatraincustommodelrequest *GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { - c := &ProjectsLocationsCollectionsDataStoresTrainCustomModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - c.googleclouddiscoveryenginev1betatraincustommodelrequest = googleclouddiscoveryenginev1betatraincustommodelrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatraincustommodelrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:trainCustomModel") + 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{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.trainCustomModel" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) 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 { @@ -14108,26 +19828,23 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... } return ret, nil // { - // "description": "Trains a custom model.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}:trainCustomModel", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.trainCustomModel", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The resource name of the Data Store, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`. This field is used to identify the data store where to train the models.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+dataStore}:trainCustomModel", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTrainCustomModelRequest" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -14138,107 +19855,119 @@ func (c *ProjectsLocationsCollectionsDataStoresTrainCustomModelCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.create": +// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Document. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14257,7 +19986,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o 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, @@ -14269,33 +19998,41 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14304,35 +20041,64 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsCreateCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": + +type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. +// Create: Creates a Schema. // -// - name: Full resource name of Document, such as +// - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{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 will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14340,21 +20106,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14362,29 +20128,34 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) doRe } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 { @@ -14403,7 +20174,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o 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, @@ -14415,25 +20186,33 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.delete", + // "description": "Creates a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/schemas", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14442,28 +20221,23 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsDeleteCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Document. +// Delete: Deletes a Schema. // -// - name: Full resource name of Document, such as +// - name: The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{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 } @@ -14471,54 +20245,41 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Get(nam // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -14529,16 +20290,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) doReque return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14557,7 +20316,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14569,25 +20328,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.get", + // "description": "Deletes a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14596,93 +20355,98 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.import": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - 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 } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// Get: Gets a Schema. // -// - parent: The parent branch resource name, such as +// - name: The full resource name of the schema, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest +// taStores/{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 information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14701,7 +20465,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14713,28 +20477,25 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.import", + // "description": "Gets a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14743,9 +20504,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsImportCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -14754,37 +20515,32 @@ type ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall struct { header_ http.Header } -// List: Gets a list of Documents. +// List: Gets a list of Schemas. // -// - parent: The parent branch resource name, such as +// - parent: The parent data store resource name, in the format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{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 -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +// 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 } @@ -14792,7 +20548,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) PageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14802,7 +20558,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Fields // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } @@ -14810,21 +20566,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) IfNone // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -14837,7 +20593,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -14850,16 +20606,16 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse // or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He +// ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -14878,7 +20634,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -14890,36 +20646,36 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Do(opt } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Gets a list of Schemas.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", // "parameterOrder": [ // "parent" // ], // "parameters": { // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", + // "path": "v1beta/{+parent}/schemas", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -14931,7 +20687,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) 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 *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -14949,34 +20705,35 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsListCall) Pages( } } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.patch": -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - 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 Document. +// Patch: Updates a Schema. // -// - name: Immutable. The full resource name of the document. Format: +// - name: Immutable. The full resource name of the schema, in the +// format of // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema return c } // AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } @@ -14984,7 +20741,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Allow // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -14992,21 +20749,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Field // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15014,7 +20771,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doReq } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } @@ -15034,16 +20791,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15062,7 +20817,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op 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, @@ -15074,180 +20829,30 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPatchCall) Do(op } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "description": "Updates a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.patch", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", // "location": "query", // "type": "boolean" // }, // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge": - -type ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Purge: Permanently deletes all selected Documents in a branch. This -// process is asynchronous. Depending on the number of Documents to be -// deleted, this operation can take hours to complete. Before the delete -// operation completes, some Documents might still be returned by -// DocumentService.GetDocument or DocumentService.ListDocuments. To get -// a list of the Documents to be deleted, set -// PurgeDocumentsRequest.force to false. -// -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsCollectionsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:purge") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.documents.purge", - // "parameterOrder": [ - // "parent" - // ], - // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/documents:purge", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -15259,9 +20864,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesDocumentsPurgeCall) Do(op } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15275,8 +20880,8 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall struct { // recommended by the API service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -15284,7 +20889,7 @@ func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) Get(na // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15294,7 +20899,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Fields // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -15302,21 +20907,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) IfNone // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15342,14 +20947,14 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15381,9 +20986,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", // "parameterOrder": [ // "name" // ], @@ -15391,7 +20996,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -15407,9 +21012,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsGetCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": -type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -15423,29 +21028,29 @@ type ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +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 *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -15453,7 +21058,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) PageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15463,7 +21068,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -15471,21 +21076,21 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) IfNon // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15511,7 +21116,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -15519,7 +21124,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) doReq // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15551,9 +21156,9 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.branches.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", // "parameterOrder": [ // "name" // ], @@ -15566,7 +21171,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // }, @@ -15596,7 +21201,7 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Do(op // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -15614,38 +21219,38 @@ func (c *ProjectsLocationsCollectionsDataStoresBranchesOperationsListCall) Pages } } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.converse": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer": -type ProjectsLocationsCollectionsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - 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 } -// Converse: Converses a conversation. +// Answer: Answer query method. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/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) 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 information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -15653,21 +21258,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Fields // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -15675,14 +21280,14 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -15690,22 +21295,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.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 *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, 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 { @@ -15724,7 +21328,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15736,28 +21340,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "description": "Answer query method.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.converse", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.answer", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "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.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:converse", + // "path": "v1beta/{+servingConfig}:answer", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15766,93 +21370,100 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsConverseCall) Do(opt } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.create": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": -type ProjectsLocationsCollectionsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a Conversation. If the Conversation to create already -// exists, an ALREADY_EXISTS error is returned. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/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 +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{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 } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// *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 *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, 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 { @@ -15871,7 +21482,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -15883,28 +21494,25 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.create", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "name": { + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -15913,84 +21521,116 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsCreateCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": -type ProjectsLocationsCollectionsDataStoresConversationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// List: Lists all ServingConfigs linked to this dataStore. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/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 +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16009,7 +21649,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16021,25 +21661,36 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.delete", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16048,79 +21699,103 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsDeleteCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.get": - -type ProjectsLocationsCollectionsDataStoresConversationsGetCall 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 *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Gets a Conversation. +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": + +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{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.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -16131,16 +21806,16 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// *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 *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, 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 { @@ -16159,7 +21834,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16171,25 +21846,34 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.get", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16198,134 +21882,102 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsGetCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": -type ProjectsLocationsCollectionsDataStoresConversationsListCall struct { - s *Service - parent 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 } -// List: Lists all Conversations by their parent DataStore. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsDataStoresConversationsService) List(parent string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c := &ProjectsLocationsCollectionsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// 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) +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresConversationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, 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 { @@ -16344,7 +21996,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16356,46 +22008,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsListCall) Do(opts .. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.list", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "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}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", + // "path": "v1beta/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16404,67 +22038,38 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.conversations.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": -type ProjectsLocationsCollectionsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Search: Performs a search. // -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -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 -} - -// 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) +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16472,21 +22077,21 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresConversationsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -16494,36 +22099,36 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("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.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// *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 *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, 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 { @@ -16542,7 +22147,7 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -16554,34 +22159,28 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.conversations.patch", + // "description": "Performs a search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "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}", + // "path": "v1beta/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16590,97 +22189,113 @@ func (c *ProjectsLocationsCollectionsDataStoresConversationsPatchCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } +} -type ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.create": + +type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + 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 Session. If the Session 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/{coll +// ection}/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 information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.models.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) 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 { @@ -16699,7 +22314,7 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts 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, @@ -16711,127 +22326,96 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsGetCall) Do(opts } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.get", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation 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/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/sessions", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.collections.dataStores.models.operations.list": - -type ProjectsLocationsCollectionsDataStoresModelsOperationsListCall 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } -// 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 +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.delete": + +type ProjectsLocationsCollectionsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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/{coll +// ection}/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 information. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/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 } @@ -16842,15 +22426,14 @@ 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -16869,7 +22452,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, @@ -16881,41 +22464,25 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Do(opts } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.models.operations.list", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -16924,30 +22491,9 @@ func (c *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.get": -type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -16956,13 +22502,13 @@ type ProjectsLocationsCollectionsDataStoresOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a Session. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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 } @@ -16970,7 +22516,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 information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -16980,7 +22526,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -16988,21 +22534,21 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17028,14 +22574,15 @@ 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17054,7 +22601,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo 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, @@ -17066,25 +22613,25 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "description": "Gets a Session.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17093,45 +22640,58 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.list": -type ProjectsLocationsCollectionsDataStoresOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresSessionsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. +// List: Lists all Sessions by their parent DataStore. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsDataStoresSessionsService) List(parent string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c := &ProjectsLocationsCollectionsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `session_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListSessions` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -17139,7 +22699,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 information. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17149,7 +22709,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -17157,21 +22717,21 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17184,7 +22744,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}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -17192,20 +22752,21 @@ 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.H +// eader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17224,7 +22785,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17236,41 +22797,46 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/operations", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { // "filter": { - // "description": "The standard list filter.", + // "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", - // "required": true, + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `session_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", // "type": "string" // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "A page token, received from a previous `ListSessions` 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/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/sessions", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17282,7 +22848,7 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Do(opts ...go // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -17300,43 +22866,43 @@ func (c *ProjectsLocationsCollectionsDataStoresOperationsListCall) Pages(ctx con } } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.patch": -type ProjectsLocationsCollectionsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Patch: Updates a Session. Session action type cannot be changed. If +// the Session to update does not exist, a NOT_FOUND error is returned. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{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 +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/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 } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Session to update. The following are NOT +// supported: * Session.name If not set or empty, all supported fields +// are updated. +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17344,21 +22910,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Fields(s ...go // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -17366,34 +22932,35 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) doRequest(alt } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17412,7 +22979,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo 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, @@ -17424,33 +22991,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } return ret, nil // { - // "description": "Creates a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.create", + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "updateMask": { + // "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+parent}/schemas", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17459,23 +23027,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasCreateCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.delete": +// method id "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get": -type ProjectsLocationsCollectionsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Get: Gets a Answer. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/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 } @@ -17483,41 +23053,54 @@ func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Delete(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) 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 *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -17528,14 +23111,15 @@ 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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswer or error will +// be non-nil. 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 *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17554,7 +23138,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17566,25 +23150,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } return ret, nil // { - // "description": "Deletes a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.delete", + // "description": "Gets a Answer.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.sessions.answers.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "description": "Required. The resource name of the Answer to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17593,98 +23177,93 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasDeleteCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": -type ProjectsLocationsCollectionsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// BatchVerifyTargetSites: Verify target sites' ownership and validity. +// This API sends all the target sites under site search engine for +// verification. // -// - name: The full resource name of the schema, in the format of +// - parent: The parent resource shared by all TargetSites being +// verified. // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, 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 { @@ -17703,7 +23282,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, @@ -17715,25 +23294,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.get", + // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}:batchVerifyTargetSites", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17742,118 +23324,92 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Gets a list of Schemas. +// DisableAdvancedSiteSearch: Downgrade from advanced site search to +// basic site search. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresSchemasService) List(parent string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *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) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17872,7 +23428,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -17884,36 +23440,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasListCall) Do(opts ...googl } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.list", + // "description": "Downgrade from advanced site search to basic site search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", // "parameterOrder": [ - // "parent" + // "siteSearchEngine" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/schemas", + // "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -17922,64 +23470,35 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": -type ProjectsLocationsCollectionsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced +// site search. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{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 will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// - siteSearchEngine: Full resource name of the SiteSearchEngine, such +// as +// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ +// siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -17987,21 +23506,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18009,34 +23528,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.patch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) 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 { @@ -18067,30 +23586,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.patch", + // "description": "Upgrade from basic site search to advanced site search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -18102,32 +23616,55 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasPatchCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": -type ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { + s *Service + siteSearchEngine string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// 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. +// FetchDomainVerificationStatus: Returns list of target sites with its +// domain verification status. This method can only be called under data +// store with BASIC_SITE_SEARCH state at the moment. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - siteSearchEngine: The site search engine resource under which we +// fetch all the domain verification status. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.siteSearchEngine = siteSearchEngine + return c +} + +// PageSize sets the optional parameter "pageSize": 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 information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18137,7 +23674,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Fields( // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ifNoneMatch_ = entityTag return c } @@ -18145,21 +23682,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) IfNoneM // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18172,7 +23709,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doReque 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/{+siteSearchEngine}:fetchDomainVerificationStatus") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18180,19 +23717,24 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +// +// or error will be non-nil. Any non-2xx status code is an error. +// +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse +// .ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18211,7 +23753,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18223,25 +23765,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations/{operationsId}", + // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, + // "siteSearchEngine": { + // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18250,119 +23803,112 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsGetCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list": - -type ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists operations that match the specified filter in the -// request. If the server doesn't support this method, it returns -// `UNIMPLEMENTED`. -// -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSchemasOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { + s *Service + siteSearchEngine string + googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 information. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "siteSearchEngine": c.siteSearchEngine, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, 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 { @@ -18381,7 +23927,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18393,41 +23939,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSchemasOperationsListCall) Do(opt } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/schemas/{schemasId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.schemas.operations.list", + // "description": "Request on-demand recrawl for a list of URIs.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", // "parameterOrder": [ - // "name" + // "siteSearchEngine" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "siteSearchEngine": { + // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+siteSearchEngine}:recrawlUris", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18436,30 +23969,9 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": -type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -18468,14 +23980,13 @@ type ProjectsLocationsCollectionsDataStoresServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the -// ServingConfig does not exist. -// -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// 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 } @@ -18483,7 +23994,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 information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18493,7 +24004,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Fields(s . // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -18501,21 +24012,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) IfNoneMatc // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18541,16 +24052,14 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18569,7 +24078,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) 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, @@ -18581,25 +24090,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. } return ret, nil // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.get", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18608,40 +24117,45 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsGetCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": -type ProjectsLocationsCollectionsDataStoresServingConfigsListCall struct { +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageSize sets the optional parameter "pageSize": 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 { +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListServingConfigs` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +// 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 } @@ -18649,7 +24163,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 information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18659,7 +24173,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Fields(s // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -18667,21 +24181,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) IfNoneMat // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18694,7 +24208,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/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -18702,22 +24216,20 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18736,7 +24248,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -18748,36 +24260,41 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Do(opts . } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", // "parameterOrder": [ - // "parent" + // "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/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1beta/{+parent}/servingConfigs", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18789,7 +24306,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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -18807,43 +24324,36 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsListCall) Pages(ctx } } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": -type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// BatchCreate: Creates TargetSite in a batch. // -// - name: Immutable. Fully qualified name -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{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.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided ServingConfig to update. The following are NOT -// supported: * ServingConfig.name If not set, all supported fields are -// updated. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The parent resource shared by all TargetSites being +// created. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. The parent field in the +// CreateBookRequest messages must either be empty or match this +// field. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -18851,21 +24361,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -18873,36 +24383,34 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doReques } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("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.servingConfigs.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -18921,7 +24429,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, @@ -18933,34 +24441,28 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", + // "description": "Creates TargetSite in a batch.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + // "parent": { + // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/targetSites:batchCreate", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -18969,43 +24471,33 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": -type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// Create: Creates a TargetSite. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - parent: Parent resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19013,21 +24505,21 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19035,14 +24527,14 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRe } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -19050,21 +24542,19 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) doRe } 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.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19083,7 +24573,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, @@ -19095,28 +24585,28 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "description": "Creates a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "parent": { + // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:recommend", + // "path": "v1beta/{+parent}/targetSites", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19125,97 +24615,241 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall) Do(o } -// method id "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a TargetSite. +// +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *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 + // { + // "description": "Deletes a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Search: Performs a search. +// Get: Gets a TargetSite. // -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// - name: Full resource name of TargetSite, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. +// If the caller does not have permission to access the TargetSite, +// regardless of whether or not it exists, a PERMISSION_DENIED error +// is returned. If the requested TargetSite does not exist, a +// NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaTargetSite or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header -// or (if a response was returned at all) in +// *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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19234,7 +24868,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19246,28 +24880,25 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Do(opts } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.search", + // "description": "Gets a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19276,96 +24907,102 @@ 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 { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest - 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 } -// BatchVerifyTargetSites: Verify target sites' ownership and validity. -// This API sends all the target sites under site search engine for -// verification. +// List: Gets a list of TargetSites. // -// - parent: The parent resource shared by all TargetSites being -// verified. +// - parent: The parent site search engine resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) BatchVerifyTargetSites(parent string, googleclouddiscoveryenginev1betabatchverifytargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to list TargetSites under this site search engine, +// regardless of whether or not this branch exists, a +// PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest = googleclouddiscoveryenginev1betabatchverifytargetsitesrequest + 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 information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchverifytargetsitesrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}:batchVerifyTargetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -19376,14 +25013,17 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTargetSitesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerRespons +// e.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19402,7 +25042,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19414,28 +25054,36 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } return ret, nil // { - // "description": "Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:batchVerifyTargetSites", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.batchVerifyTargetSites", + // "description": "Gets a list of TargetSites.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "pageSize": { + // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being verified. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}:batchVerifyTargetSites", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaBatchVerifyTargetSitesRequest" - // }, + // "path": "v1beta/{+parent}/targetSites", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19444,35 +25092,56 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineBatchVerifyTarget } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": + +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DisableAdvancedSiteSearch: Downgrade from advanced site search to -// basic site search. +// Patch: Updates a TargetSite. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) DisableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest = googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest +// - name: Output only. The fully qualified resource name of the target +// site. +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` +// The `target_site_id` is system-generated. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19480,21 +25149,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19502,34 +25171,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadisableadvancedsitesearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("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.disableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall) 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 { @@ -19560,25 +25229,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } return ret, nil // { - // "description": "Downgrade from advanced site search to basic site search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:disableAdvancedSiteSearch", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.disableAdvancedSiteSearch", + // "description": "Updates a TargetSite.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", // "parameterOrder": [ - // "siteSearchEngine" + // "name" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "name": { + // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:disableAdvancedSiteSearch", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDisableAdvancedSiteSearchRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -19590,92 +25259,97 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineDisableAdvancedSi } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest - 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 } -// EnableAdvancedSiteSearch: Upgrade from basic site search to advanced -// site search. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - siteSearchEngine: Full resource name of the SiteSearchEngine, such -// as -// `projects/{project}/locations/{location}/dataStores/{data_store_id}/ -// siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) EnableAdvancedSiteSearch(siteSearchEngine string, googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest *GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine - c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest = googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaenableadvancedsitesearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSiteSearchCall) 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 { @@ -19706,26 +25380,23 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } return ret, nil // { - // "description": "Upgrade from basic site search to advanced site search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:enableAdvancedSiteSearch", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.enableAdvancedSiteSearch", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", // "parameterOrder": [ - // "siteSearchEngine" + // "name" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.", + // "name": { + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:enableAdvancedSiteSearch", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEnableAdvancedSiteSearchRequest" - // }, + // "path": "v1beta/{+name}", // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -19736,47 +25407,45 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineEnableAdvancedSit } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus": +// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall struct { - s *Service - siteSearchEngine string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall 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. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - siteSearchEngine: The site search engine resource under which we -// fetch all the domain verification status. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineService) FetchDomainVerificationStatus(siteSearchEngine string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.siteSearchEngine = siteSearchEngine +// - 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 } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +// Filter sets the optional parameter "filter": 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": A page token, -// received from a previous `FetchDomainVerificationStatus` call. -// Provide this to retrieve the subsequent page. When paginating, all -// other parameters provided to `FetchDomainVerificationStatus` must -// match the call that provided the page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -19784,7 +25453,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19794,7 +25463,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -19802,21 +25471,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) 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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -19829,7 +25498,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/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -19837,24 +25506,20 @@ 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. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse -// -// or error will be non-nil. Any non-2xx status code is an error. -// -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse -// .ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerificationStatusCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -19873,7 +25538,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -19885,36 +25550,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } return ret, nil // { - // "description": "Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:fetchDomainVerificationStatus", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.fetchDomainVerificationStatus", + // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", // "parameterOrder": [ - // "siteSearchEngine" + // "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/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", + // "required": true, + // "type": "string" + // }, // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", + // "description": "The standard list page size.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `FetchDomainVerificationStatus` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchDomainVerificationStatus` must match the call that provided the page token.", + // "description": "The standard list page token.", // "location": "query", // "type": "string" - // }, - // "siteSearchEngine": { - // "description": "Required. The site search engine resource under which we fetch all the domain verification status. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", - // "required": true, - // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:fetchDomainVerificationStatus", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaFetchDomainVerificationStatusResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -19926,7 +25596,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 *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -19944,34 +25614,33 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineFetchDomainVerifi } } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris": +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall struct { - s *Service - siteSearchEngine string - googleclouddiscoveryenginev1betarecrawlurisrequest *GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest - 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 } -// RecrawlUris: Request on-demand recrawl for a list of URIs. +// Import: Imports all SuggestionDenyListEntry for a DataStore. // -// - 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 +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -19979,21 +25648,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20001,14 +25670,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecrawlurisrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+siteSearchEngine}:recrawlUris") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20016,19 +25685,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "siteSearchEngine": c.siteSearchEngine, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) 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 { @@ -20059,25 +25728,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } return ret, nil // { - // "description": "Request on-demand recrawl for a list of URIs.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine:recrawlUris", + // "description": "Imports all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", // "parameterOrder": [ - // "siteSearchEngine" + // "parent" // ], // "parameters": { - // "siteSearchEngine": { - // "description": "Required. Full resource name of the SiteSearchEngine, such as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.", + // "parent": { + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+siteSearchEngine}:recrawlUris", + // "path": "v1beta/{+parent}/suggestionDenyListEntries:import", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecrawlUrisRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -20089,97 +25758,91 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineRecrawlUrisCall) } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get": +// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Purge: Permanently deletes all SuggestionDenyListEntry for a +// DataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent data store resource name for which to import +// denylist entries. Follows pattern +// projects/*/locations/*/collections/*/dataStores/*. +func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { + c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) 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 *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall) 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 { @@ -20210,23 +25873,26 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get", + // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "The name of the operation resource.", + // "parent": { + // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/suggestionDenyListEntries:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -20237,53 +25903,60 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsGetCall } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall struct { +type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall 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`. +// 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: 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 +// - parent: The parent DataStore resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("filter", filter) +// Ets sets the optional parameter "ets": The event timestamp in +// milliseconds. This prevents browser caching of otherwise identical +// get requests. The name is abbreviated to reduce the payload bytes. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("ets", fmt.Sprint(ets)) return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Uri sets the optional parameter "uri": The URL including +// cgi-parameters but excluding the hash fragment with a length limit of +// 5,000 characters. This is often more useful than the referer URL, +// because many browsers only send the domain for third-party requests. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("uri", uri) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UserEvent sets the optional parameter "userEvent": Required. URL +// encoded UserEvent proto with a length limit of 2,000,000 characters. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { + c.urlParams_.Set("userEvent", userEvent) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20293,7 +25966,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ifNoneMatch_ = entityTag return c } @@ -20301,21 +25974,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) 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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20328,7 +26001,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -20336,20 +26009,19 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. +// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20368,7 +26040,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20380,41 +26052,41 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineOperationsListCal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/operations", + // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.list", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", + // "ets": { + // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", + // "format": "int64", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "parent": { + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", + // "uri": { + // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", // "location": "query", - // "type": "integer" + // "type": "string" // }, - // "pageToken": { - // "description": "The standard list page token.", + // "userEvent": { + // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/userEvents:collect", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleApiHttpBody" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20423,57 +26095,182 @@ 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 { +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": + +type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest + 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. +// +// - parent: Parent DataStore resource name, of the form +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *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. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.import" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) 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() } - c.PageToken(x.NextPageToken) + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } + return ret, nil + // { + // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "parent": { + // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/userEvents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" + // }, + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate": +// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates TargetSite in a batch. +// Write: Writes a single user event. // -// - parent: The parent resource shared by all TargetSites being -// created. +// - parent: The parent DataStore resource name, such as // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. The parent field in the -// CreateBookRequest messages must either be empty or match this -// field. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) BatchCreate(parent string, googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest *GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}`. +func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { + c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest = googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest + c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20481,21 +26278,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20503,14 +26300,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betabatchcreatetargetsitesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20523,14 +26320,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaUserEvent or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20549,7 +26348,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -20561,28 +26360,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } return ret, nil // { - // "description": "Creates TargetSite in a batch.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites:batchCreate", + // "description": "Writes a single user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.batchCreate", + // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent resource shared by all TargetSites being created. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. The parent field in the CreateBookRequest messages must either be empty or match this field.", + // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/targetSites:batchCreate", + // "path": "v1beta/{+parent}/userEvents:write", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaBatchCreateTargetSitesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -20591,33 +26390,42 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesBatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create": +// method id "discoveryengine.projects.locations.collections.engines.create": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a TargetSite. +// Create: Creates a Engine. // -// - parent: Parent resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Create(parent string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// EngineId sets the optional parameter "engineId": Required. The ID to +// use for the Engine, which will become the final component of the +// Engine's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesCreateCall) EngineId(engineId string) *ProjectsLocationsCollectionsEnginesCreateCall { + c.urlParams_.Set("engineId", engineId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20625,21 +26433,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20647,14 +26455,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } reqHeaders.Set("User-Agent", c.s.userAgent()) 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 } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -20667,14 +26475,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.create" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20705,25 +26513,30 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } return ret, nil // { - // "description": "Creates a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "description": "Creates a Engine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.create", + // "id": "discoveryengine.projects.locations.collections.engines.create", // "parameterOrder": [ // "parent" // ], // "parameters": { + // "engineId": { + // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, // "parent": { - // "description": "Required. Parent resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/targetSites", + // "path": "v1beta/{+parent}/engines", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "response": { // "$ref": "GoogleLongrunningOperation" @@ -20735,9 +26548,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesCreate } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete": +// method id "discoveryengine.projects.locations.collections.engines.delete": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall struct { +type ProjectsLocationsCollectionsEnginesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20745,17 +26558,16 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall header_ http.Header } -// Delete: Deletes a TargetSite. +// Delete: Deletes a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Delete(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. If the caller does not have permission to +// delete the Engine, regardless of whether or not it exists, a +// PERMISSION_DENIED error is returned. If the Engine to delete does +// not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { + c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20763,7 +26575,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20771,21 +26583,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20808,14 +26620,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.delete" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20846,18 +26658,18 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } return ret, nil // { - // "description": "Deletes a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "description": "Deletes a Engine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.delete", + // "id": "discoveryengine.projects.locations.collections.engines.delete", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } @@ -20873,9 +26685,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesDelete } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get": +// method id "discoveryengine.projects.locations.collections.engines.get": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall struct { +type ProjectsLocationsCollectionsEnginesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -20884,17 +26696,13 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall st header_ http.Header } -// Get: Gets a TargetSite. +// Get: Gets a Engine. // -// - name: Full resource name of TargetSite, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. -// If the caller does not have permission to access the TargetSite, -// regardless of whether or not it exists, a PERMISSION_DENIED error -// is returned. If the requested TargetSite does not exist, a -// NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Full resource name of Engine, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { + c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -20902,7 +26710,7 @@ func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesServic // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -20912,7 +26720,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { c.ifNoneMatch_ = entityTag return c } @@ -20920,21 +26728,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -20960,16 +26768,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaTargetSite or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaTargetSite.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaTargetSite, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -20988,7 +26795,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaTargetSite{ + ret := &GoogleCloudDiscoveryengineV1betaEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21000,25 +26807,25 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } return ret, nil // { - // "description": "Gets a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", + // "description": "Gets a Engine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.get", + // "id": "discoveryengine.projects.locations.collections.engines.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of TargetSite, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`. If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned.", + // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21027,9 +26834,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesGetCal } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list": +// method id "discoveryengine.projects.locations.collections.engines.list": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall struct { +type ProjectsLocationsCollectionsEnginesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -21038,36 +26845,32 @@ type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall s header_ http.Header } -// List: Gets a list of TargetSites. +// List: Lists all the Engines associated with the project. // -// - parent: The parent site search engine resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to list TargetSites under this site search engine, -// regardless of whether or not this branch exists, a -// PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) List(parent string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. +func (r *ProjectsLocationsCollectionsEnginesService) List(parent string) *ProjectsLocationsCollectionsEnginesListCall { + c := &ProjectsLocationsCollectionsEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Requested page size. -// Server may return fewer items than requested. If unspecified, server -// will pick an appropriate default. The maximum value is 1000; values -// above 1000 will be coerced to 1000. If this field is negative, an -// INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: solution_type=SOLUTION_TYPE_SEARCH +func (c *ProjectsLocationsCollectionsEnginesListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListTargetSites` call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters -// provided to `ListTargetSites` must match the call that provided the -// page token. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +// PageToken sets the optional parameter "pageToken": Not supported. +func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -21075,7 +26878,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21085,7 +26888,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { c.ifNoneMatch_ = entityTag return c } @@ -21093,21 +26896,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall { +func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21120,7 +26923,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/targetSites") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -21133,17 +26936,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListTargetSitesResponse.ServerRespons -// e.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListEnginesResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.He +// ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse, 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 { @@ -21162,7 +26964,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListTargetSitesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21174,36 +26976,225 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } return ret, nil // { - // "description": "Gets a list of TargetSites.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites", + // "description": "Lists all the Engines associated with the project.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.list", + // "id": "discoveryengine.projects.locations.collections.engines.list", + // "parameterOrder": [ + // "parent" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Optional. Not supported.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Not supported.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+parent}/engines", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaListEnginesResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +// method id "discoveryengine.projects.locations.collections.engines.patch": + +type ProjectsLocationsCollectionsEnginesPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Engine +// +// - name: Immutable. The fully qualified resource name of the engine. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}` engine should be 1-63 characters, and valid +// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is +// returned. +func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { + c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Engine to update. If an unsupported or unknown +// field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates an Engine", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. The maximum value is 1000; values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous `ListTargetSites` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargetSites` must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent site search engine resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", + // "name": { + // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/targetSites", + // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListTargetSitesResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21212,56 +27203,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCa } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListTargetSitesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch": +// method id "discoveryengine.projects.locations.collections.engines.pause": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesPauseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a TargetSite. +// Pause: Pauses the training of an existing engine. Only applicable if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: Output only. The fully qualified resource name of the target -// site. -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine/targetSites/{target_site}` -// The `target_site_id` is system-generated. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesService) Patch(name string, googleclouddiscoveryenginev1betatargetsite *GoogleCloudDiscoveryengineV1betaTargetSite) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to pause. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { + c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betatargetsite = googleclouddiscoveryenginev1betatargetsite + 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 information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21269,21 +27238,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) 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 *ProjectsLocationsCollectionsEnginesPauseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21291,16 +27260,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatargetsite) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapauseenginerequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:pause") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21311,14 +27280,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21337,7 +27307,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC 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, @@ -21349,28 +27319,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } return ret, nil // { - // "description": "Updates a TargetSite.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/{targetSitesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.patch", + // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.pause", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Output only. The fully qualified resource name of the target site. `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.", + // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:pause", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTargetSite" + // "$ref": "GoogleCloudDiscoveryengineV1betaPauseEngineRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21379,79 +27349,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesPatchC } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.resume": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesResumeCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// Resume: Resumes the training of an existing engine. Only applicable +// if SolutionType is SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) Get(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the engine to resume. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_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 information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesResumeCall) 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 *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaresumeenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21462,14 +27426,15 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsGetCall) 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 { @@ -21488,7 +27453,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat 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, @@ -21500,25 +27465,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.get", + // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.resume", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:resume", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaResumeEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21527,100 +27495,73 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } -// method id "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list": +// method id "discoveryengine.projects.locations.collections.engines.tune": -type ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesTuneCall struct { + s *Service + name string + googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest + 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`. +// Tune: Tunes an existing engine. Only applicable if SolutionType is +// SOLUTION_TYPE_RECOMMENDATION. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsService) List(name string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c := &ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the engine to tune. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection_id}/engines/{engine_id}`. +func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { + c := &ProjectsLocationsCollectionsEnginesTuneCall{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) + 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 information. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatuneenginerequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -21631,15 +27572,14 @@ 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. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was +// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21658,7 +27598,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21670,41 +27610,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSiteSearchEngineTargetSitesOperat } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/siteSearchEngine/targetSites/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.targetSites.operations.list", + // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.tune", // "parameterOrder": [ // "name" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, // "name": { - // "description": "The name of the operation's parent resource.", + // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+name}:tune", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaTuneEngineRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21713,54 +27640,38 @@ 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 { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import": +// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest - 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 } -// Import: Imports all SuggestionDenyListEntry for a DataStore. +// Converse: Converses a conversation. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Import(parent string, googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { + c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21768,21 +27679,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) 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 *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21790,14 +27701,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportsuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21805,19 +27716,22 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21836,7 +27750,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21848,28 +27762,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } return ret, nil // { - // "description": "Imports all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:import", + // "description": "Converses a conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.import", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "name": { + // "description": "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/suggestionDenyListEntries:import", + // "path": "v1beta/{+name}:converse", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -21878,34 +27792,34 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesImportCa } -// method id "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge": +// method id "discoveryengine.projects.locations.collections.engines.conversations.create": -type ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest - 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 } -// Purge: Permanently deletes all SuggestionDenyListEntry for a -// DataStore. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - parent: The parent data store resource name for which to import -// denylist entries. Follows pattern -// projects/*/locations/*/collections/*/dataStores/*. -func (r *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesService) Purge(parent string, googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest *GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { - c := &ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { + c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest = googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -21913,21 +27827,21 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) 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 *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -21935,14 +27849,14 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgesuggestiondenylistentriesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/suggestionDenyListEntries:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -21955,14 +27869,16 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.suggestionDenyListEntries.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -21981,7 +27897,7 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -21993,28 +27909,28 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } return ret, nil // { - // "description": "Permanently deletes all SuggestionDenyListEntry for a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/suggestionDenyListEntries:purge", + // "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.dataStores.suggestionDenyListEntries.purge", + // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. The parent data store resource name for which to import denylist entries. Follows pattern projects/*/locations/*/collections/*/dataStores/*.", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/suggestionDenyListEntries:purge", + // "path": "v1beta/{+parent}/conversations", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeSuggestionDenyListEntriesRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22023,125 +27939,84 @@ func (c *ProjectsLocationsCollectionsDataStoresSuggestionDenyListEntriesPurgeCal } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.collect": +// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": -type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesConversationsDeleteCall 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 Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Ets sets the optional parameter "ets": The event timestamp in -// milliseconds. This prevents browser caching of otherwise identical -// get requests. The name is abbreviated to reduce the payload bytes. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Ets(ets int64) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("ets", fmt.Sprint(ets)) - return c -} - -// Uri sets the optional parameter "uri": The URL including -// cgi-parameters but excluding the hash fragment with a length limit of -// 5,000 characters. This is often more useful than the referer URL, -// because many browsers only send the domain for third-party requests. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Uri(uri string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("uri", uri) - return c -} - -// UserEvent sets the optional parameter "userEvent": Required. URL -// encoded UserEvent proto with a length limit of 2,000,000 characters. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) UserEvent(userEvent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.urlParams_.Set("userEvent", userEvent) +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { + c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) 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 *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:collect") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.collect" call. -// Exactly one of *GoogleApiHttpBody or error will be non-nil. Any +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +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 { @@ -22160,7 +28035,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22172,41 +28047,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } return ret, nil // { - // "description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:collect", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.collect", + // "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": [ - // "parent" + // "name" // ], // "parameters": { - // "ets": { - // "description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", - // "format": "int64", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" - // }, - // "uri": { - // "description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for third-party requests.", - // "location": "query", - // "type": "string" - // }, - // "userEvent": { - // "description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:collect", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleApiHttpBody" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22215,95 +28074,99 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall) Do(opts .. } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.import": +// method id "discoveryengine.projects.locations.collections.engines.conversations.get": -type ProjectsLocationsCollectionsDataStoresUserEventsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest - 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 } -// 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 Conversation. // -// - parent: Parent DataStore resource name, of the form -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Import(parent string, googleclouddiscoveryenginev1betaimportusereventsrequest *GoogleCloudDiscoveryengineV1betaImportUserEventsRequest) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportusereventsrequest = googleclouddiscoveryenginev1betaimportusereventsrequest +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsImportCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) 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 *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportusereventsrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("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. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22322,7 +28185,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22334,28 +28197,25 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } return ret, nil // { - // "description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.import", + // "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": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. Parent DataStore resource name, of the form `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportUserEventsRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22364,72 +28224,113 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsImportCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.dataStores.userEvents.write": +// method id "discoveryengine.projects.locations.collections.engines.conversations.list": -type ProjectsLocationsCollectionsDataStoresUserEventsWriteCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent - 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 } -// Write: Writes a single user event. +// List: Lists all Conversations by their parent DataStore. // -// - parent: The parent DataStore resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Write(parent string, googleclouddiscoveryenginev1betauserevent *GoogleCloudDiscoveryengineV1betaUserEvent) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { - c := &ProjectsLocationsCollectionsDataStoresUserEventsWriteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betauserevent = googleclouddiscoveryenginev1betauserevent + 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 information. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) 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 *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betauserevent) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/userEvents:write") + 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 } @@ -22440,16 +28341,17 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.userEvents.write" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaUserEvent or error +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaUserEvent.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaUserEvent, error) { +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 { @@ -22468,7 +28370,7 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaUserEvent{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22480,28 +28382,46 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } return ret, nil // { - // "description": "Writes a single user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/userEvents:write", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.dataStores.userEvents.write", + // "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 parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "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/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/userEvents:write", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" - // }, + // "path": "v1beta/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaUserEvent" + // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22510,42 +28430,67 @@ func (c *ProjectsLocationsCollectionsDataStoresUserEventsWriteCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsEnginesCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": + +type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Engine. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - 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 +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } -// 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) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22553,21 +28498,21 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesCreateCall { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) 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 *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22575,34 +28520,36 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") + 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.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22621,7 +28568,7 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal 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, @@ -22633,33 +28580,34 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Creates a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.create", + // "description": "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": [ - // "parent" + // "name" // ], // "parameters": { - // "engineId": { - // "description": "Required. The ID to use for the Engine, which will become the final component of the Engine's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "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/{+parent}/engines", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22668,26 +28616,24 @@ func (c *ProjectsLocationsCollectionsEnginesCreateCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.delete": +// method id "discoveryengine.projects.locations.collections.engines.operations.get": -type ProjectsLocationsCollectionsEnginesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// 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} -// /engines/{engine_id}`. If the caller does not have permission to -// delete the Engine, regardless of whether or not it exists, a -// PERMISSION_DENIED error is returned. If the Engine to delete does -// not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsCollectionsEnginesService) Delete(name string) *ProjectsLocationsCollectionsEnginesDeleteCall { - c := &ProjectsLocationsCollectionsEnginesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -22695,41 +28641,54 @@ 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 information. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) 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 *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-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 } @@ -22740,14 +28699,14 @@ 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.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22778,18 +28737,18 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Deletes a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.delete", + // "description": "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": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`. If the caller does not have permission to delete the Engine, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Engine to delete does not exist, a NOT_FOUND error is returned.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -22805,9 +28764,9 @@ func (c *ProjectsLocationsCollectionsEnginesDeleteCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.get": +// method id "discoveryengine.projects.locations.collections.engines.operations.list": -type ProjectsLocationsCollectionsEnginesGetCall struct { +type ProjectsLocationsCollectionsEnginesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -22816,21 +28775,42 @@ type ProjectsLocationsCollectionsEnginesGetCall struct { header_ http.Header } -// Get: Gets a Engine. +// 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 Engine, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Get(name string) *ProjectsLocationsCollectionsEnginesGetCall { - c := &ProjectsLocationsCollectionsEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCollectionsEnginesOperationsService) List(name string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c := &ProjectsLocationsCollectionsEnginesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -22840,7 +28820,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Fields(s ...googleapi.Field // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -22848,21 +28828,21 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) IfNoneMatch(entityTag strin // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesGetCall { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) 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 *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -22875,7 +28855,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -22888,15 +28868,15 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will +// Do executes the "discoveryengine.projects.locations.collections.engines.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if +// *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 *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -22915,7 +28895,7 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -22927,25 +28907,41 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a Engine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", + // "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.get", + // "id": "discoveryengine.projects.locations.collections.engines.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. Full resource name of Engine, such as `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.", + // "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": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -22954,118 +28950,118 @@ func (c *ProjectsLocationsCollectionsEnginesGetCall) Do(opts ...googleapi.CallOp } -// method id "discoveryengine.projects.locations.collections.engines.list": - -type ProjectsLocationsCollectionsEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists all the Engines associated with the project. -// -// - 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 +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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 -} +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.answer": -// PageSize sets the optional parameter "pageSize": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Not supported. -func (c *ProjectsLocationsCollectionsEnginesListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Answer: Answer query method. +// +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/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) 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 information. -func (c *ProjectsLocationsCollectionsEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesListCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/engines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListEnginesResponse +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse // or error will be non-nil. Any non-2xx status code is an error. // Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListEnginesResponse.ServerResponse.He +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.He // ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListEnginesResponse, error) { +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 { @@ -23084,7 +29080,7 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListEnginesResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23096,41 +29092,28 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Lists all the Engines associated with the project.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.list", + // "description": "Answer query method.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:answer", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.answer", // "parameterOrder": [ - // "parent" + // "servingConfig" // ], // "parameters": { - // "filter": { - // "description": "Optional. Filter by solution type. For example: solution_type=SOLUTION_TYPE_SEARCH", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Optional. Not supported.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. Not supported.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/engines", + // "path": "v1beta/{+servingConfig}:answer", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListEnginesResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23139,105 +29122,80 @@ func (c *ProjectsLocationsCollectionsEnginesListCall) Do(opts ...googleapi.CallO } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.patch": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": -type ProjectsLocationsCollectionsEnginesPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Engine +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: Immutable. The fully qualified resource name of the engine. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. Format: +// - name: The resource name of the ServingConfig to get. Format: // `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}` engine should be 1-63 characters, and valid -// characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is -// returned. -func (r *ProjectsLocationsCollectionsEnginesService) Patch(name string, googleclouddiscoveryenginev1betaengine *GoogleCloudDiscoveryengineV1betaEngine) *ProjectsLocationsCollectionsEnginesPatchCall { - c := &ProjectsLocationsCollectionsEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaengine = googleclouddiscoveryenginev1betaengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Engine to update. If an unsupported or unknown -// field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPatchCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaengine) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -23248,15 +29206,16 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23275,7 +29234,7 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23287,34 +29246,25 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Updates an Engine", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.patch", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The fully qualified resource name of the engine. This field must be a UTF-8 encoded string with a length limit of 1024 characters. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}` engine should be 1-63 characters, and valid characters are /a-z0-9*/. Otherwise, an INVALID_ARGUMENT error is returned.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided Engine to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23323,92 +29273,116 @@ func (c *ProjectsLocationsCollectionsEnginesPatchCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.pause": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": -type ProjectsLocationsCollectionsEnginesPauseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Pause: Pauses the training of an existing engine. Only applicable if -// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +// List: Lists all ServingConfigs linked to this dataStore. // -// - name: The name of the engine to pause. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Pause(name string, googleclouddiscoveryenginev1betapauseenginerequest *GoogleCloudDiscoveryengineV1betaPauseEngineRequest) *ProjectsLocationsCollectionsEnginesPauseCall { - c := &ProjectsLocationsCollectionsEnginesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betapauseenginerequest = googleclouddiscoveryenginev1betapauseenginerequest +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{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 information. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesPauseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapauseenginerequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.pause" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23427,7 +29401,7 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23439,28 +29413,36 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Pauses the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:pause", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.pause", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The name of the engine to pause. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "pageSize": { + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:pause", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPauseEngineRequest" - // }, + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23469,34 +29451,64 @@ func (c *ProjectsLocationsCollectionsEnginesPauseCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.collections.engines.resume": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsCollectionsEnginesResumeCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": + +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + 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. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - name: The name of the engine to resume. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Resume(name string, googleclouddiscoveryenginev1betaresumeenginerequest *GoogleCloudDiscoveryengineV1betaResumeEngineRequest) *ProjectsLocationsCollectionsEnginesResumeCall { - c := &ProjectsLocationsCollectionsEnginesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{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.googleclouddiscoveryenginev1betaresumeenginerequest = googleclouddiscoveryenginev1betaresumeenginerequest + 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 information. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23504,21 +29516,21 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Fields(s ...googleapi.Fi // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesResumeCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23526,16 +29538,16 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaresumeenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:resume") + 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 } @@ -23546,15 +29558,16 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.resume" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaEngine or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaEngine.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaEngine, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23573,7 +29586,7 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaEngine{ + ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23585,28 +29598,34 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Resumes the training of an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:resume", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.resume", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The name of the engine to resume. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+name}:resume", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaResumeEngineRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23615,34 +29634,43 @@ func (c *ProjectsLocationsCollectionsEnginesResumeCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.engines.tune": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": -type ProjectsLocationsCollectionsEnginesTuneCall struct { - s *Service - name string - googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest - 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 } -// Tune: Tunes an existing engine. Only applicable if SolutionType is -// SOLUTION_TYPE_RECOMMENDATION. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The resource name of the engine to tune. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection_id}/engines/{engine_id}`. -func (r *ProjectsLocationsCollectionsEnginesService) Tune(name string, googleclouddiscoveryenginev1betatuneenginerequest *GoogleCloudDiscoveryengineV1betaTuneEngineRequest) *ProjectsLocationsCollectionsEnginesTuneCall { - c := &ProjectsLocationsCollectionsEnginesTuneCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betatuneenginerequest = googleclouddiscoveryenginev1betatuneenginerequest +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23650,21 +29678,21 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesTuneCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23672,14 +29700,14 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betatuneenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:tune") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23687,19 +29715,21 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) doRequest(alt string) (*ht } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.tune" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -23718,7 +29748,7 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23730,28 +29760,28 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Tunes an existing engine. Only applicable if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}:tune", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.tune", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the engine to tune. Format: `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:tune", + // "path": "v1beta/{+servingConfig}:recommend", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaTuneEngineRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23760,38 +29790,38 @@ func (c *ProjectsLocationsCollectionsEnginesTuneCall) Do(opts ...googleapi.CallO } -// method id "discoveryengine.projects.locations.collections.engines.conversations.converse": +// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": -type ProjectsLocationsCollectionsEnginesConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Search: Performs a search. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { - c := &ProjectsLocationsCollectionsEnginesConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23799,21 +29829,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Fields(s // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsConverseCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23821,14 +29851,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23836,22 +29866,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe -// sponse.Header or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, 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 { @@ -23870,7 +29899,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -23882,28 +29911,28 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}:converse", + // "description": "Performs a search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.converse", + // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "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.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}:converse", + // "path": "v1beta/{+servingConfig}:search", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -23912,34 +29941,55 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsConverseCall) Do(opts . } -// method id "discoveryengine.projects.locations.collections.engines.conversations.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } +} -type ProjectsLocationsCollectionsEnginesConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.collections.engines.sessions.create": + +type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + 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. +// 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/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { - c := &ProjectsLocationsCollectionsEnginesConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { + c := &ProjectsLocationsCollectionsEnginesSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -23947,21 +29997,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsCreateCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -23969,14 +30019,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -23989,16 +30039,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// 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) { +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24017,7 +30066,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24029,10 +30078,10 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.create", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.create", // "parameterOrder": [ // "parent" // ], @@ -24045,12 +30094,12 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", + // "path": "v1beta/{+parent}/sessions", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24059,9 +30108,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsCreateCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.delete": +// method id "discoveryengine.projects.locations.collections.engines.sessions.delete": -type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { +type ProjectsLocationsCollectionsEnginesSessionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24069,14 +30118,14 @@ type ProjectsLocationsCollectionsEnginesConversationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Conversation. If the Conversation to delete does -// not exist, a NOT_FOUND error is returned. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: The resource name of the Conversation to delete. Format: +// - name: The resource name of the Session to delete. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name string) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { - c := &ProjectsLocationsCollectionsEnginesConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection}/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 } @@ -24084,7 +30133,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24092,21 +30141,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Fields(s .. // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsDeleteCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24129,14 +30178,14 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.delete" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.delete" call. // Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any // non-2xx status code is an error. Response headers are in either // *GoogleProtobufEmpty.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +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 { @@ -24167,18 +30216,18 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.delete", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.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 Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } @@ -24194,9 +30243,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsDeleteCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.conversations.get": +// method id "discoveryengine.projects.locations.collections.engines.sessions.get": -type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24205,13 +30254,13 @@ type ProjectsLocationsCollectionsEnginesConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Session. // -// - name: The resource name of the Conversation to get. Format: +// - name: The resource name of the Session to get. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Get(name string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { - c := &ProjectsLocationsCollectionsEnginesConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// ection}/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 } @@ -24219,7 +30268,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 information. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24229,7 +30278,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Fields(s ...go // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -24237,21 +30286,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) IfNoneMatch(en // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsGetCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24273,20 +30322,19 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) doRequest(alt 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. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsCollectionsEnginesSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24305,7 +30353,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24317,25 +30365,25 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "description": "Gets a Session.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.get", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.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 Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24344,9 +30392,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsGetCall) Do(opts ...goo } -// method id "discoveryengine.projects.locations.collections.engines.conversations.list": +// method id "discoveryengine.projects.locations.collections.engines.sessions.list": -type ProjectsLocationsCollectionsEnginesConversationsListCall struct { +type ProjectsLocationsCollectionsEnginesSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -24355,13 +30403,13 @@ type ProjectsLocationsCollectionsEnginesConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Lists all Sessions by their parent DataStore. // // - parent: The data store resource name. Format: // `projects/{project_number}/locations/{location_id}/collections/{coll // ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent string) *ProjectsLocationsCollectionsEnginesConversationsListCall { - c := &ProjectsLocationsCollectionsEnginesConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsCollectionsEnginesSessionsService) List(parent string) *ProjectsLocationsCollectionsEnginesSessionsListCall { + c := &ProjectsLocationsCollectionsEnginesSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } @@ -24369,7 +30417,7 @@ func (r *ProjectsLocationsCollectionsEnginesConversationsService) List(parent st // Filter sets the optional parameter "filter": A filter to apply on the // list results. The supported features are: user_pseudo_id, state. // Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -24377,9 +30425,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Filter(filter // OrderBy sets the optional parameter "orderBy": A comma-separated list // of fields to order by, sorted in ascending order. Use "desc" after a // field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" +// `create_time` * `session_name` Example: "update_time desc" // "create_time" -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -24387,15 +30435,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) OrderBy(order // PageSize sets the optional parameter "pageSize": Maximum number of // results to return. If unspecified, defaults to 50. Max allowed value // is 1000. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to +// received from a previous `ListSessions` call. Provide this to // retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24403,7 +30451,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 information. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24413,7 +30461,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Fields(s ...g // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -24421,21 +30469,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) IfNoneMatch(e // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsListCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24448,7 +30496,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/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -24461,17 +30509,16 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.H +// eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, 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 { @@ -24490,7 +30537,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24502,10 +30549,10 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.list", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.list", // "parameterOrder": [ // "parent" // ], @@ -24516,7 +30563,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "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": "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\"", // "location": "query", // "type": "string" // }, @@ -24527,7 +30574,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "type": "integer" // }, // "pageToken": { - // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", + // "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, @@ -24539,9 +30586,9 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Do(opts ...go // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", + // "path": "v1beta/{+parent}/sessions", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24553,7 +30600,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 *ProjectsLocationsCollectionsEnginesSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -24571,38 +30618,35 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsListCall) Pages(ctx con } } -// method id "discoveryengine.projects.locations.collections.engines.conversations.patch": +// method id "discoveryengine.projects.locations.collections.engines.sessions.patch": -type ProjectsLocationsCollectionsEnginesConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. +// Patch: Updates a Session. Session action type cannot be changed. If +// the Session to update does not exist, a NOT_FOUND error is returned. // // - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsCollectionsEnginesConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { - c := &ProjectsLocationsCollectionsEnginesConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/sessions/*`. +func (r *ProjectsLocationsCollectionsEnginesSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { + c := &ProjectsLocationsCollectionsEnginesSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +// 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 } @@ -24610,7 +30654,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) UpdateMask(u // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24618,21 +30662,21 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Fields(s ... // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesConversationsPatchCall { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24640,7 +30684,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } @@ -24660,16 +30704,15 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsCollectionsEnginesSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -24688,7 +30731,7 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -24700,23 +30743,23 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } return ret, nil // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/conversations/{conversationsId}", + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.conversations.patch", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+$", // "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": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -24724,10 +30767,10 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g // }, // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -24736,9 +30779,159 @@ func (c *ProjectsLocationsCollectionsEnginesConversationsPatchCall) Do(opts ...g } -// method id "discoveryengine.projects.locations.collections.engines.operations.get": +// method id "discoveryengine.projects.locations.collections.engines.sessions.answers.get": -type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { +type ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Answer. +// +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id +// }`. +func (r *ProjectsLocationsCollectionsEnginesSessionsAnswersService) Get(name string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c := &ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswer or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaAnswer.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + 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 + // { + // "description": "Gets a Answer.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/sessions/{sessionsId}/answers/{answersId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.collections.engines.sessions.answers.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "Required. 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}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/sessions/[^/]+/answers/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.collections.operations.get": + +type ProjectsLocationsCollectionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24752,8 +30945,8 @@ type ProjectsLocationsCollectionsEnginesOperationsGetCall struct { // 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)} +func (r *ProjectsLocationsCollectionsOperationsService) Get(name string) *ProjectsLocationsCollectionsOperationsGetCall { + c := &ProjectsLocationsCollectionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -24761,7 +30954,7 @@ func (r *ProjectsLocationsCollectionsEnginesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24771,7 +30964,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -24779,21 +30972,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsGetCall { +func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsGetCall) 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 *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24819,14 +31012,14 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.operations.get" call. +// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +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 { @@ -24858,9 +31051,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.get", + // "id": "discoveryengine.projects.locations.collections.operations.get", // "parameterOrder": [ // "name" // ], @@ -24868,7 +31061,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -24884,9 +31077,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.collections.engines.operations.list": +// method id "discoveryengine.projects.locations.collections.operations.list": -type ProjectsLocationsCollectionsEnginesOperationsListCall struct { +type ProjectsLocationsCollectionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -24900,29 +31093,29 @@ type ProjectsLocationsCollectionsEnginesOperationsListCall struct { // `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)} +func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { + c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +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 *ProjectsLocationsCollectionsEnginesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesOperationsListCall { +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 *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -24930,7 +31123,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -24940,7 +31133,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -24948,21 +31141,21 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesOperationsListCall { +func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsOperationsListCall) 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 *ProjectsLocationsCollectionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -24988,7 +31181,7 @@ 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.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -24996,7 +31189,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) doRequest(alt st // a response was returned 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 *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25028,9 +31221,9 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/operations", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.operations.list", + // "id": "discoveryengine.projects.locations.collections.operations.list", // "parameterOrder": [ // "name" // ], @@ -25043,7 +31236,7 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Do(opts ...googl // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", // "required": true, // "type": "string" // }, @@ -25073,7 +31266,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 *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -25091,100 +31284,332 @@ func (c *ProjectsLocationsCollectionsEnginesOperationsListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.get": +// method id "discoveryengine.projects.locations.dataStores.completeQuery": + +type ProjectsLocationsDataStoresCompleteQueryCall struct { + s *Service + dataStore string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// CompleteQuery: Completes the specified user input with keyword +// suggestions. +// +// - dataStore: The parent data store resource name for which the +// completion is performed, such as +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store`. +func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { + c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataStore = dataStore + return c +} + +// IncludeTailSuggestions sets the optional parameter +// "includeTailSuggestions": Indicates if tail suggestions should be +// returned if there are no suggestions that match the full query. Even +// if set to true, if there are suggestions that match the full query, +// those are returned and no tail suggestions are returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) + return c +} + +// Query sets the optional parameter "query": Required. The typeahead +// input used to fetch suggestions. Maximum length is 128 characters. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("query", query) + return c +} + +// QueryModel sets the optional parameter "queryModel": Specifies the +// autocomplete data model. This overrides any model specified in the +// Configuration > Autocomplete section of the Cloud console. Currently +// supported values: * `document` - Using suggestions generated from +// user-imported documents. * `search-history` - Using suggestions +// generated from the past history of SearchService.Search API calls. Do +// not use it when there is no traffic for Search API. * `user-event` - +// Using suggestions generated from user-imported search events. * +// `document-completable` - Using suggestions taken directly from +// user-imported document fields marked as completable. Default values: +// * `document` is the default model for regular dataStores. * +// `search-history` is the default model for site search dataStores. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("queryModel", queryModel) + return c +} + +// UserPseudoId sets the optional parameter "userPseudoId": A unique +// identifier for tracking visitors. For example, this could be +// implemented with an HTTP cookie, which should be able to uniquely +// identify a visitor on a single device. This unique identifier should +// not change if the visitor logs in or out of the website. This field +// should NOT have a fixed value such as `unknown_visitor`. This should +// be the same identifier as UserEvent.user_pseudo_id and +// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded +// string with a length limit of 128 characters. Otherwise, an +// `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("userPseudoId", userPseudoId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresCompleteQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "dataStore": c.dataStore, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. +// Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Completes the specified user input with keyword suggestions.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "parameterOrder": [ + // "dataStore" + // ], + // "parameters": { + // "dataStore": { + // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" + // }, + // "includeTailSuggestions": { + // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", + // "location": "query", + // "type": "boolean" + // }, + // "query": { + // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", + // "location": "query", + // "type": "string" + // }, + // "queryModel": { + // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", + // "location": "query", + // "type": "string" + // }, + // "userPseudoId": { + // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // } + // }, + // "path": "v1beta/{+dataStore}:completeQuery", + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.create": -type ProjectsLocationsCollectionsEnginesServingConfigsGetCall 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 ServingConfig. Returns a NotFound error if the -// ServingConfig does not exist. +// 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 ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Get(name string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}`. +func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { + c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// CreateAdvancedSiteSearch sets the optional parameter +// "createAdvancedSiteSearch": A boolean flag indicating whether user +// want to directly create an advanced data store for site search. If +// the data store is not configured as site search (GENERIC vertical and +// PUBLIC_WEBSITE content_config), this flag will be ignored. +func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) + return c +} + +// DataStoreId sets the optional parameter "dataStoreId": Required. The +// ID to use for the DataStore, which will become the final component of +// the DataStore's resource name. This field must conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { + c.urlParams_.Set("dataStoreId", dataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := 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.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25203,7 +31628,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go 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, @@ -25215,25 +31640,38 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go } return ret, nil // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.get", + // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + // "createAdvancedSiteSearch": { + // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", + // "location": "query", + // "type": "boolean" + // }, + // "dataStoreId": { + // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/dataStores", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25242,116 +31680,86 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsGetCall) Do(opts ...go } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.list": +// method id "discoveryengine.projects.locations.dataStores.delete": -type ProjectsLocationsCollectionsEnginesServingConfigsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// Delete: Deletes a DataStore. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) List(parent string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 100. If a value -// greater than 100 is provided, at most 100 results are returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListServingConfigs` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: Full resource name of DataStore, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to delete the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the DataStore to +// delete does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { + c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsListCall { +func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-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 := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp -// onse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25370,7 +31778,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25382,36 +31790,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.list", + // "description": "Deletes a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + // "name": { + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/servingConfigs", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25420,103 +31817,82 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Do(opts ...g } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.patch": +// method id "discoveryengine.projects.locations.dataStores.get": -type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// Get: Gets a DataStore. // -// - name: Immutable. Fully qualified name +// - name: Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id} -// /engines/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// /dataStores/{data_store_id}`. If the caller does not have +// permission to access the DataStore, regardless of whether or not it +// exists, a PERMISSION_DENIED error is returned. If the requested +// DataStore does not exist, a NOT_FOUND error is returned. +func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { + c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - 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 information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -25527,16 +31903,16 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response +// Do executes the "discoveryengine.projects.locations.dataStores.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -25555,7 +31931,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaDataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25567,34 +31943,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", + // "description": "Gets a DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25603,102 +31970,101 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ... } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": -type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Recommend: Makes a recommendation, which requires a contextual user -// event. +// GetSiteSearchEngine: Gets the SiteSearchEngine. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: Resource name of SiteSearchEngine, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/siteSearchEngine`. If the caller does not +// have permission to access the [SiteSearchEngine], regardless of +// whether or not it exists, a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or // error will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade +// r or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, 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 { @@ -25717,7 +32083,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25729,28 +32095,25 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } return ret, nil // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.recommend", + // "description": "Gets the SiteSearchEngine.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", + // "name": { + // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25759,97 +32122,129 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall) Do(opts } -// method id "discoveryengine.projects.locations.collections.engines.servingConfigs.search": +// method id "discoveryengine.projects.locations.dataStores.list": + +type ProjectsLocationsDataStoresListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists all the DataStores associated with the project. +// +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection_id} +// `. If the caller does not have permission to list DataStores under +// this location, regardless of whether or not this data store exists, +// a PERMISSION_DENIED error is returned. +func (r *ProjectsLocationsDataStoresService) List(parent string) *ProjectsLocationsDataStoresListCall { + c := &ProjectsLocationsDataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter by solution type. +// For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH' +func (c *ProjectsLocationsDataStoresListCall) Filter(filter string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("filter", filter) + return c +} -type ProjectsLocationsCollectionsEnginesServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// 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 } -// Search: Performs a search. -// -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest +// PageToken sets the optional parameter "pageToken": A page token +// ListDataStoresResponse.next_page_token, received from a previous +// DataStoreService.ListDataStores call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DataStoreService.ListDataStores must match the call that provided the +// page token. Otherwise, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header -// or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse +// .Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, 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 { @@ -25868,7 +32263,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -25880,28 +32275,41 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Do(opts .. } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.search", + // "description": "Lists all the DataStores associated with the project.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.list", // "parameterOrder": [ - // "servingConfig" + // "parent" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "filter": { + // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" - // }, + // "path": "v1beta/{+parent}/dataStores", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -25913,9 +32321,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 *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { x, err := c.Do() if err != nil { @@ -25927,83 +32335,85 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + c.PageToken(x.NextPageToken) } } -// method id "discoveryengine.projects.locations.collections.operations.get": +// method id "discoveryengine.projects.locations.dataStores.patch": -type ProjectsLocationsCollectionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Patch: Updates 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: Immutable. The full resource name of the data store. Format: +// `projects/{project}/locations/{location}/collections/{collection_id} +// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded +// string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { + c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided DataStore to update. If an unsupported or +// unknown field is provided, an INVALID_ARGUMENT error is returned. +func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsGetCall { +func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresPatchCall) 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 *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -26014,14 +32424,16 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26040,7 +32452,7 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal 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, @@ -26052,25 +32464,34 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.get", + // "description": "Updates a DataStore", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26079,119 +32500,107 @@ func (c *ProjectsLocationsCollectionsOperationsGetCall) Do(opts ...googleapi.Cal } -// method id "discoveryengine.projects.locations.collections.operations.list": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": -type ProjectsLocationsCollectionsOperationsListCall 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 } -// 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 Document. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsCollectionsOperationsService) List(name string) *ProjectsLocationsCollectionsOperationsListCall { - c := &ProjectsLocationsCollectionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsCollectionsOperationsListCall) Filter(filter string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsCollectionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCollectionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// DocumentId sets the optional parameter "documentId": Required. The ID +// to use for the Document, which will become the final component of the +// Document.name. If the caller does not have permission to create the +// Document, regardless of whether or not it exists, a +// `PERMISSION_DENIED` error is returned. This field must be unique +// among all Documents with the same parent. Otherwise, an +// `ALREADY_EXISTS` error is returned. This field must conform to +// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length +// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { + c.urlParams_.Set("documentId", documentId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsCollectionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsCollectionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsCollectionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCollectionsOperationsListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsCollectionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + 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.collections.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26210,7 +32619,7 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26222,41 +32631,33 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.collections.operations.list", + // "description": "Creates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", + // "documentId": { + // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", // "location": "query", // "type": "string" // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "parent": { + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/documents", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26265,171 +32666,87 @@ func (c *ProjectsLocationsCollectionsOperationsListCall) Do(opts ...googleapi.Ca } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.completeQuery": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": -type ProjectsLocationsDataStoresCompleteQueryCall struct { - s *Service - dataStore 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 } -// CompleteQuery: Completes the specified user input with keyword -// suggestions. +// Delete: Deletes a Document. // -// - dataStore: The parent data store resource name for which the -// completion is performed, such as -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store`. -func (r *ProjectsLocationsDataStoresService) CompleteQuery(dataStore string) *ProjectsLocationsDataStoresCompleteQueryCall { - c := &ProjectsLocationsDataStoresCompleteQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataStore = dataStore - return c -} - -// IncludeTailSuggestions sets the optional parameter -// "includeTailSuggestions": Indicates if tail suggestions should be -// returned if there are no suggestions that match the full query. Even -// if set to true, if there are suggestions that match the full query, -// those are returned and no tail suggestions are returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IncludeTailSuggestions(includeTailSuggestions bool) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("includeTailSuggestions", fmt.Sprint(includeTailSuggestions)) - return c -} - -// Query sets the optional parameter "query": Required. The typeahead -// input used to fetch suggestions. Maximum length is 128 characters. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Query(query string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("query", query) - return c -} - -// QueryModel sets the optional parameter "queryModel": Specifies the -// autocomplete data model. This overrides any model specified in the -// Configuration > Autocomplete section of the Cloud console. Currently -// supported values: * `document` - Using suggestions generated from -// user-imported documents. * `search-history` - Using suggestions -// generated from the past history of SearchService.Search API calls. Do -// not use it when there is no traffic for Search API. * `user-event` - -// Using suggestions generated from user-imported search events. * -// `document-completable` - Using suggestions taken directly from -// user-imported document fields marked as completable. Default values: -// * `document` is the default model for regular dataStores. * -// `search-history` is the default model for site search dataStores. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) QueryModel(queryModel string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("queryModel", queryModel) - return c -} - -// UserPseudoId sets the optional parameter "userPseudoId": A unique -// identifier for tracking visitors. For example, this could be -// implemented with an HTTP cookie, which should be able to uniquely -// identify a visitor on a single device. This unique identifier should -// not change if the visitor logs in or out of the website. This field -// should NOT have a fixed value such as `unknown_visitor`. This should -// be the same identifier as UserEvent.user_pseudo_id and -// SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded -// string with a length limit of 128 characters. Otherwise, an -// `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) UserPseudoId(userPseudoId string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.urlParams_.Set("userPseudoId", userPseudoId) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to delete the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the Document to delete does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresCompleteQueryCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCompleteQueryCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+dataStore}:completeQuery") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "dataStore": c.dataStore, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.completeQuery" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaCompleteQueryResponse.ServerResponse. -// Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCompleteQueryResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26448,7 +32765,7 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaCompleteQueryResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26460,45 +32777,25 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Completes the specified user input with keyword suggestions.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}:completeQuery", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.completeQuery", + // "description": "Deletes a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", // "parameterOrder": [ - // "dataStore" + // "name" // ], // "parameters": { - // "dataStore": { - // "description": "Required. The parent data store resource name for which the completion is performed, such as `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" - // }, - // "includeTailSuggestions": { - // "description": "Indicates if tail suggestions should be returned if there are no suggestions that match the full query. Even if set to true, if there are suggestions that match the full query, those are returned and no tail suggestions are returned.", - // "location": "query", - // "type": "boolean" - // }, - // "query": { - // "description": "Required. The typeahead input used to fetch suggestions. Maximum length is 128 characters.", - // "location": "query", - // "type": "string" - // }, - // "queryModel": { - // "description": "Specifies the autocomplete data model. This overrides any model specified in the Configuration \u003e Autocomplete section of the Cloud console. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.", - // "location": "query", - // "type": "string" - // }, - // "userPseudoId": { - // "description": "A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This field should NOT have a fixed value such as `unknown_visitor`. This should be the same identifier as UserEvent.user_pseudo_id and SearchRequest.user_pseudo_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+dataStore}:completeQuery", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaCompleteQueryResponse" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26507,111 +32804,103 @@ func (c *ProjectsLocationsDataStoresCompleteQueryCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.create": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": -type ProjectsLocationsDataStoresCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates a DataStore. DataStore is for storing Documents. To -// serve these documents for Search, or Recommendation use case, an -// Engine needs to be created separately. +// Get: Gets a Document. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}`. -func (r *ProjectsLocationsDataStoresService) Create(parent string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresCreateCall { - c := &ProjectsLocationsDataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// CreateAdvancedSiteSearch sets the optional parameter -// "createAdvancedSiteSearch": A boolean flag indicating whether user -// want to directly create an advanced data store for site search. If -// the data store is not configured as site search (GENERIC vertical and -// PUBLIC_WEBSITE content_config), this flag will be ignored. -func (c *ProjectsLocationsDataStoresCreateCall) CreateAdvancedSiteSearch(createAdvancedSiteSearch bool) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("createAdvancedSiteSearch", fmt.Sprint(createAdvancedSiteSearch)) - return c -} - -// DataStoreId sets the optional parameter "dataStoreId": Required. The -// ID to use for the DataStore, which will become the final component of -// the DataStore's resource name. This field must conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. Otherwise, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresCreateCall) DataStoreId(dataStoreId string) *ProjectsLocationsDataStoresCreateCall { - c.urlParams_.Set("dataStoreId", dataStoreId) +// - name: Full resource name of Document, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}/documents/{document}`. If +// the caller does not have permission to access the Document, +// regardless of whether or not it exists, a `PERMISSION_DENIED` error +// is returned. If the requested Document does not exist, a +// `NOT_FOUND` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresCreateCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or +// (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26630,7 +32919,7 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26642,38 +32931,25 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Creates a DataStore. DataStore is for storing Documents. To serve these documents for Search, or Recommendation use case, an Engine needs to be created separately.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.create", + // "description": "Gets a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "createAdvancedSiteSearch": { - // "description": "A boolean flag indicating whether user want to directly create an advanced data store for site search. If the data store is not configured as site search (GENERIC vertical and PUBLIC_WEBSITE content_config), this flag will be ignored.", - // "location": "query", - // "type": "boolean" - // }, - // "dataStoreId": { - // "description": "Required. The ID to use for the DataStore, which will become the final component of the DataStore's resource name. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}`.", + // "name": { + // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/dataStores", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26682,34 +32958,36 @@ func (c *ProjectsLocationsDataStoresCreateCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.delete": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": -type ProjectsLocationsDataStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a DataStore. +// Import: Bulk import of multiple Documents. Request processing may be +// synchronous. Non-existing items will be created. Note: It is possible +// for a subset of the Documents to be successfully updated. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to delete the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the DataStore to -// delete does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Delete(name string) *ProjectsLocationsDataStoresDeleteCall { - c := &ProjectsLocationsDataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Requires create/update +// permission. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26717,21 +32995,21 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Fields(s ...googleapi.Field) *Pr // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresDeleteCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26739,29 +33017,34 @@ func (c *ProjectsLocationsDataStoresDeleteCall) doRequest(alt string) (*http.Res } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.delete" call. +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26792,23 +33075,26 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Deletes a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.delete", + // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to delete the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the DataStore to delete does not exist, a NOT_FOUND error is returned.", + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/documents:import", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -26819,35 +33105,56 @@ func (c *ProjectsLocationsDataStoresDeleteCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.get": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": -type ProjectsLocationsDataStoresGetCall struct { +type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a DataStore. +// List: Gets a list of Documents. // -// - name: Full resource name of DataStore, such as -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. If the caller does not have -// permission to access the DataStore, regardless of whether or not it -// exists, a PERMISSION_DENIED error is returned. If the requested -// DataStore does not exist, a NOT_FOUND error is returned. -func (r *ProjectsLocationsDataStoresService) Get(name string) *ProjectsLocationsDataStoresGetCall { - c := &ProjectsLocationsDataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent branch resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. Use `default_branch` as +// the branch ID, to list documents under the default branch. If the +// caller does not have permission to list Documents under this +// branch, regardless of whether or not this branch exists, a +// `PERMISSION_DENIED` error is returned. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// Documents to return. If unspecified, defaults to 100. The maximum +// allowed value is 1000. Values above 1000 will be coerced to 1000. If +// this field is negative, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token +// ListDocumentsResponse.next_page_token, received from a previous +// DocumentService.ListDocuments call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// DocumentService.ListDocuments must match the call that provided the +// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -26857,7 +33164,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Fields(s ...googleapi.Field) *Proje // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ifNoneMatch_ = entityTag return c } @@ -26865,21 +33172,21 @@ func (c *ProjectsLocationsDataStoresGetCall) IfNoneMatch(entityTag string) *Proj // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -26892,7 +33199,7 @@ func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Respon var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -26900,21 +33207,21 @@ func (c *ProjectsLocationsDataStoresGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. +// Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, 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 { @@ -26933,7 +33240,7 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDataStore{ + ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26945,25 +33252,36 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } return ret, nil // { - // "description": "Gets a DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", + // "description": "Gets a list of Documents.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.get", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. If the caller does not have permission to access the DataStore, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested DataStore does not exist, a NOT_FOUND error is returned.", + // "pageSize": { + // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/documents", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -26972,81 +33290,102 @@ func (c *ProjectsLocationsDataStoresGetCall) Do(opts ...googleapi.CallOption) (* } -// method id "discoveryengine.projects.locations.dataStores.getSiteSearchEngine": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresGetSiteSearchEngineCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": + +type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetSiteSearchEngine: Gets the SiteSearchEngine. +// Patch: Updates a Document. // -// - name: Resource name of SiteSearchEngine, such as +// - name: Immutable. The full resource name of the document. Format: // `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/siteSearchEngine`. If the caller does not -// have permission to access the [SiteSearchEngine], regardless of -// whether or not it exists, a PERMISSION_DENIED error is returned. -func (r *ProjectsLocationsDataStoresService) GetSiteSearchEngine(name string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c := &ProjectsLocationsDataStoresGetSiteSearchEngineCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// taStores/{data_store}/branches/{branch}/documents/{document_id}`. +// This field must be a UTF-8 encoded string with a length limit of +// 1024 characters. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Document is not found, a new Document will be created. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Context(ctx context.Context) *ProjectsLocationsDataStoresGetSiteSearchEngineCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+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 } @@ -27055,18 +33394,18 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) doRequest(alt strin "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.dataStores.getSiteSearchEngine" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSiteSearchEngine or -// error will be non-nil. Any non-2xx status code is an error. Response +} + +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaSiteSearchEngine.ServerResponse.Heade -// r or (if a response was returned at all) in +// *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 *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSiteSearchEngine, error) { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27085,7 +33424,7 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSiteSearchEngine{ + ret := &GoogleCloudDiscoveryengineV1betaDocument{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27097,25 +33436,33 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the SiteSearchEngine.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/siteSearchEngine", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.getSiteSearchEngine", + // "description": "Updates a Document.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "Required. Resource name of SiteSearchEngine, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`. If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", + // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSiteSearchEngine" + // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27124,108 +33471,78 @@ func (c *ProjectsLocationsDataStoresGetSiteSearchEngineCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.list": +// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": -type ProjectsLocationsDataStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the DataStores associated with the project. +// Purge: Permanently deletes all selected Documents in a branch. This +// process is asynchronous. Depending on the number of Documents to be +// deleted, this operation can take hours to complete. Before the delete +// operation completes, some Documents might still be returned by +// DocumentService.GetDocument or DocumentService.ListDocuments. To get +// a list of the Documents to be deleted, set +// PurgeDocumentsRequest.force to false. // -// - parent: The parent branch resource name, such as -// `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)} +// - parent: The parent resource name, such as +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/branches/{branch}`. +func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { + c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - 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) + c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresListCall { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) 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 *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/dataStores") + 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 } @@ -27236,17 +33553,14 @@ func (c *ProjectsLocationsDataStoresListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaListDataStoresResponse.ServerResponse -// .Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDataStoresResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.purge" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27265,7 +33579,7 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDataStoresResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27277,41 +33591,28 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } return ret, nil // { - // "description": "Lists all the DataStores associated with the project.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.list", + // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "filter": { - // "description": "Filter by solution type. For example: filter = 'solution_type:SOLUTION_TYPE_SEARCH'", - // "location": "query", - // "type": "string" - // }, - // "pageSize": { - // "description": "Maximum number of DataStores to return. If unspecified, defaults to 10. The maximum allowed value is 50. Values above 50 will be coerced to 50. If this field is negative, an INVALID_ARGUMENT is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDataStoresResponse.next_page_token, received from a previous DataStoreService.ListDataStores call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DataStoreService.ListDataStores must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection_id}`. If the caller does not have permission to list DataStores under this location, regardless of whether or not this data store exists, a PERMISSION_DENIED error is returned.", + // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/dataStores", + // "path": "v1beta/{+parent}/documents:purge", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDataStoresResponse" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27320,102 +33621,79 @@ func (c *ProjectsLocationsDataStoresListCall) Do(opts ...googleapi.CallOption) ( } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.patch": +// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": -type ProjectsLocationsDataStoresPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DataStore +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: Immutable. The full resource name of the data store. Format: -// `projects/{project}/locations/{location}/collections/{collection_id} -// /dataStores/{data_store_id}`. This field must be a UTF-8 encoded -// string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresService) Patch(name string, googleclouddiscoveryenginev1betadatastore *GoogleCloudDiscoveryengineV1betaDataStore) *ProjectsLocationsDataStoresPatchCall { - c := &ProjectsLocationsDataStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresBranchesOperationsService) Get(name string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c := &ProjectsLocationsDataStoresBranchesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betadatastore = googleclouddiscoveryenginev1betadatastore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided DataStore to update. If an unsupported or -// unknown field is provided, an INVALID_ARGUMENT error is returned. -func (c *ProjectsLocationsDataStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresPatchCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) 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 *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadatastore) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27426,16 +33704,14 @@ func (c *ProjectsLocationsDataStoresPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDataStore or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDataStore.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDataStore, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27454,7 +33730,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, @@ -27466,34 +33742,25 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } return ret, nil // { - // "description": "Updates a DataStore", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.patch", + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. The full resource name of the data store. Format: `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" - // }, - // "updateMask": { - // "description": "Indicates which fields in the provided DataStore to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", - // "format": "google-fieldmask", - // "location": "query", - // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" - // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDataStore" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27502,107 +33769,119 @@ func (c *ProjectsLocationsDataStoresPatchCall) Do(opts ...googleapi.CallOption) } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.create": +// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": -type ProjectsLocationsDataStoresBranchesDocumentsCreateCall struct { - s *Service - parent 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 } -// Create: Creates a Document. +// List: Lists operations that match the specified filter in the +// request. If the server doesn't support this method, it returns +// `UNIMPLEMENTED`. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Create(parent string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument +// - 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 } -// DocumentId sets the optional parameter "documentId": Required. The ID -// to use for the Document, which will become the final component of the -// Document.name. If the caller does not have permission to create the -// Document, regardless of whether or not it exists, a -// `PERMISSION_DENIED` error is returned. This field must be unique -// among all Documents with the same parent. Otherwise, an -// `ALREADY_EXISTS` error is returned. This field must conform to -// RFC-1034 (https://tools.ietf.org/html/rfc1034) standard with a length -// limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) DocumentId(documentId string) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { - c.urlParams_.Set("documentId", documentId) +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsCreateCall { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27621,7 +33900,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog 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, @@ -27633,33 +33912,41 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } return ret, nil // { - // "description": "Creates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.create", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "documentId": { - // "description": "Required. The ID to use for the Document, which will become the final component of the Document.name. If the caller does not have permission to create the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. This field must be unique among all Documents with the same parent. Otherwise, an `ALREADY_EXISTS` error is returned. This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters. Otherwise, an `INVALID_ARGUMENT` error is returned.", + // "filter": { + // "description": "The standard list filter.", // "location": "query", // "type": "string" // }, - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "The name of the operation's parent resource.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", // "required": true, // "type": "string" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27668,35 +33955,59 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsCreateCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.delete": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresBranchesDocumentsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.conversations.converse": + +type ProjectsLocationsDataStoresConversationsConverseCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Document. -// -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to delete the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the Document to delete does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Delete(name string) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// Converse: Converses a conversation. +// +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +// Use +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/-` to activate +// auto session mode, which automatically creates a new conversation +// inside a ConverseConversation session. +func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { + c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27704,21 +34015,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -27726,11 +34037,16 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -27741,14 +34057,17 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe +// sponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27767,7 +34086,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27779,25 +34098,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } return ret, nil // { - // "description": "Deletes a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.delete", + // "description": "Converses a conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to delete the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the Document to delete does not exist, a `NOT_FOUND` error is returned.", + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+name}:converse", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // }, // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27806,103 +34128,93 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsDeleteCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.get": +// method id "discoveryengine.projects.locations.dataStores.conversations.create": -type ProjectsLocationsDataStoresBranchesDocumentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Document. +// Create: Creates a Conversation. If the Conversation to create already +// exists, an ALREADY_EXISTS error is returned. // -// - name: Full resource name of Document, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document}`. If -// the caller does not have permission to access the Document, -// regardless of whether or not it exists, a `PERMISSION_DENIED` error -// is returned. If the requested Document does not exist, a -// `NOT_FOUND` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Get(name string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: Full resource name of parent data store. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { + c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsGetCall { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27921,7 +34233,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27933,25 +34245,28 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } return ret, nil // { - // "description": "Gets a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.get", + // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.conversations.create", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "name": { - // "description": "Required. Full resource name of Document, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`. If the caller does not have permission to access the Document, regardless of whether or not it exists, a `PERMISSION_DENIED` error is returned. If the requested Document does not exist, a `NOT_FOUND` error is returned.", + // "parent": { + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+parent}/conversations", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -27960,36 +34275,32 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsGetCall) Do(opts ...googlea } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.import": +// method id "discoveryengine.projects.locations.dataStores.conversations.delete": -type ProjectsLocationsDataStoresBranchesDocumentsImportCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresConversationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Bulk import of multiple Documents. Request processing may be -// synchronous. Non-existing items will be created. Note: It is possible -// for a subset of the Documents to be successfully updated. +// Delete: Deletes a Conversation. If the Conversation to delete does +// not exist, a NOT_FOUND error is returned. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Requires create/update -// permission. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Import(parent string, googleclouddiscoveryenginev1betaimportdocumentsrequest *GoogleCloudDiscoveryengineV1betaImportDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaimportdocumentsrequest = googleclouddiscoveryenginev1betaimportdocumentsrequest +// - name: The resource name of the Conversation to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { + c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27997,21 +34308,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Fields(s ...goo // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsImportCall { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) 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 *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28019,34 +34330,29 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) doRequest(alt s } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaimportdocumentsrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.import" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28065,7 +34371,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, @@ -28077,28 +34383,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } return ret, nil // { - // "description": "Bulk import of multiple Documents. Request processing may be synchronous. Non-existing items will be created. Note: It is possible for a subset of the Documents to be successfully updated.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:import", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.import", + // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Requires create/update permission.", + // "name": { + // "description": "Required. The resource name of the Conversation to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents:import", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaImportDocumentsRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28107,56 +34410,32 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsImportCall) Do(opts ...goog } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.list": +// method id "discoveryengine.projects.locations.dataStores.conversations.get": -type ProjectsLocationsDataStoresBranchesDocumentsListCall struct { +type ProjectsLocationsDataStoresConversationsGetCall 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 a Conversation. // -// - parent: The parent branch resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. Use `default_branch` as -// the branch ID, to list documents under the default branch. If the -// caller does not have permission to list Documents under this -// branch, regardless of whether or not this branch exists, a -// `PERMISSION_DENIED` error is returned. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) List(parent string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// Documents to return. If unspecified, defaults to 100. The maximum -// allowed value is 1000. Values above 1000 will be coerced to 1000. If -// this field is negative, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token -// ListDocumentsResponse.next_page_token, received from a previous -// DocumentService.ListDocuments call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// DocumentService.ListDocuments must match the call that provided the -// page token. Otherwise, an `INVALID_ARGUMENT` error is returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Conversation to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { + c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28166,7 +34445,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28174,21 +34453,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsListCall { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsGetCall) 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 *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28201,7 +34480,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 { @@ -28209,21 +34488,21 @@ 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. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListDocumentsResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListDocumentsResponse.ServerResponse. -// Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *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 *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListDocumentsResponse, error) { +func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28242,7 +34521,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListDocumentsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaConversation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28254,36 +34533,25 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } return ret, nil // { - // "description": "Gets a list of Documents.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents", + // "description": "Gets a Conversation.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.list", + // "id": "discoveryengine.projects.locations.dataStores.conversations.get", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "pageSize": { - // "description": "Maximum number of Documents to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an `INVALID_ARGUMENT` error is returned.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token ListDocumentsResponse.next_page_token, received from a previous DocumentService.ListDocuments call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to DocumentService.ListDocuments must match the call that provided the page token. Otherwise, an `INVALID_ARGUMENT` error is returned.", - // "location": "query", - // "type": "string" - // }, - // "parent": { - // "description": "Required. The parent branch resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`. Use `default_branch` as the branch ID, to list documents under the default branch. If the caller does not have permission to list Documents under this branch, regardless of whether or not this branch exists, a `PERMISSION_DENIED` error is returned.", + // "name": { + // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents", + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListDocumentsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28292,122 +34560,134 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Do(opts ...google } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesDocumentsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListDocumentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +// method id "discoveryengine.projects.locations.dataStores.conversations.list": + +type ProjectsLocationsDataStoresConversationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.patch": +// List: Lists all Conversations by their parent DataStore. +// +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { + c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} -type ProjectsLocationsDataStoresBranchesDocumentsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("filter", filter) + return c } -// Patch: Updates a Document. -// -// - name: Immutable. The full resource name of the document. Format: -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}/documents/{document_id}`. -// This field must be a UTF-8 encoded string with a length limit of -// 1024 characters. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Patch(name string, googleclouddiscoveryenginev1betadocument *GoogleCloudDiscoveryengineV1betaDocument) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betadocument = googleclouddiscoveryenginev1betadocument +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `conversation_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Document is not found, a new Document will be created. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListConversations` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPatchCall { +func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betadocument) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.documents.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaDocument or error +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error // will be non-nil. Any non-2xx status code is an error. Response // headers are in either -// *GoogleCloudDiscoveryengineV1betaDocument.ServerResponse.Header or -// (if a response was returned at all) in +// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaDocument, error) { +func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28426,7 +34706,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaDocument{ + ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28438,33 +34718,46 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } return ret, nil // { - // "description": "Updates a Document.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents/{documentsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.patch", + // "description": "Lists all Conversations by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.conversations.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Document is not found, a new Document will be created.", + // "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": "boolean" + // "type": "string" // }, - // "name": { - // "description": "Immutable. The full resource name of the document. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "orderBy": { + // "description": "A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending. Supported fields: * `update_time` * `create_time` * `conversation_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", + // "type": "string" + // }, + // "pageSize": { + // "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "A page token, received from a previous `ListConversations` call. Provide this to retrieve the subsequent page.", + // "location": "query", + // "type": "string" + // }, + // "parent": { + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/documents/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" - // }, + // "path": "v1beta/{+parent}/conversations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaDocument" + // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28473,39 +34766,67 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPatchCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.documents.purge": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresBranchesDocumentsPurgeCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.conversations.patch": + +type ProjectsLocationsDataStoresConversationsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// 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. +// Patch: Updates a Conversation. Conversation action type cannot be +// changed. If the Conversation to update does not exist, a NOT_FOUND +// error is returned. // -// - parent: The parent resource name, such as -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/branches/{branch}`. -func (r *ProjectsLocationsDataStoresBranchesDocumentsService) Purge(parent string, googleclouddiscoveryenginev1betapurgedocumentsrequest *GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { - c := &ProjectsLocationsDataStoresBranchesDocumentsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betapurgedocumentsrequest = googleclouddiscoveryenginev1betapurgedocumentsrequest +// - name: Immutable. Fully qualified name +// `project/*/locations/global/collections/{collection}/dataStore/*/con +// versations/*` or +// `project/*/locations/global/collections/{collection}/engines/*/conve +// rsations/*`. +func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { + c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided Conversation to update. The following are NOT +// supported: * Conversation.name If not set or empty, all supported +// fields are updated. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28513,21 +34834,21 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Fields(s ...goog // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresConversationsPatchCall) 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 *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28535,34 +34856,36 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) doRequest(alt st } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betapurgedocumentsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/documents: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.dataStores.branches.documents.purge" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28581,7 +34904,7 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl 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, @@ -28593,28 +34916,34 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } return ret, nil // { - // "description": "Permanently deletes all selected Documents in a branch. This process is asynchronous. Depending on the number of Documents to be deleted, this operation can take hours to complete. Before the delete operation completes, some Documents might still be returned by DocumentService.GetDocument or DocumentService.ListDocuments. To get a list of the Documents to be deleted, set PurgeDocumentsRequest.force to false.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/documents:purge", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.branches.documents.purge", + // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.", + // "name": { + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", // "required": true, // "type": "string" + // }, + // "updateMask": { + // "description": "Indicates which fields in the provided Conversation to update. The following are NOT supported: * Conversation.name If not set or empty, all supported fields are updated.", + // "format": "google-fieldmask", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/documents:purge", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaPurgeDocumentsRequest" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -28623,9 +34952,9 @@ func (c *ProjectsLocationsDataStoresBranchesDocumentsPurgeCall) Do(opts ...googl } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.get": +// method id "discoveryengine.projects.locations.dataStores.models.operations.get": -type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { +type ProjectsLocationsDataStoresModelsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28639,8 +34968,8 @@ type ProjectsLocationsDataStoresBranchesOperationsGetCall struct { // 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)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { + c := &ProjectsLocationsDataStoresModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -28648,7 +34977,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 information. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28658,7 +34987,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Fields(s ...googl // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -28666,21 +34995,21 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) IfNoneMatch(entit // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsGetCall { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28706,14 +35035,14 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28745,9 +35074,9 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google return ret, nil // { // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations/{operationsId}", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", // "parameterOrder": [ // "name" // ], @@ -28755,7 +35084,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google // "name": { // "description": "The name of the operation resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", // "required": true, // "type": "string" // } @@ -28771,9 +35100,9 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsGetCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.branches.operations.list": +// method id "discoveryengine.projects.locations.dataStores.models.operations.list": -type ProjectsLocationsDataStoresBranchesOperationsListCall struct { +type ProjectsLocationsDataStoresModelsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -28787,29 +35116,29 @@ type ProjectsLocationsDataStoresBranchesOperationsListCall struct { // `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresBranchesOperationsService) List(name string) *ProjectsLocationsDataStoresBranchesOperationsListCall { - c := &ProjectsLocationsDataStoresBranchesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { + c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list // filter. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list // page size. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list // page token. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28817,7 +35146,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 information. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28827,7 +35156,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Fields(s ...goog // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ifNoneMatch_ = entityTag return c } @@ -28835,21 +35164,21 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) IfNoneMatch(enti // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresBranchesOperationsListCall { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -28875,7 +35204,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.branches.operations.list" call. +// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. // Exactly one of *GoogleLongrunningListOperationsResponse or error will // be non-nil. Any non-2xx status code is an error. Response headers are // in either @@ -28883,7 +35212,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) doRequest(alt st // a response was returned at all) in error.(*googleapi.Error).Header. // Use googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28915,9 +35244,9 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl return ret, nil // { // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/branches/{branchesId}/operations", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.branches.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", // "parameterOrder": [ // "name" // ], @@ -28930,7 +35259,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // "name": { // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", // "required": true, // "type": "string" // }, @@ -28960,7 +35289,7 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Do(opts ...googl // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -28978,77 +35307,248 @@ func (c *ProjectsLocationsDataStoresBranchesOperationsListCall) Pages(ctx contex } } -// method id "discoveryengine.projects.locations.dataStores.conversations.converse": +// method id "discoveryengine.projects.locations.dataStores.operations.get": -type ProjectsLocationsDataStoresConversationsConverseCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Converse: Converses a conversation. +// Get: Gets the latest state of a long-running operation. Clients can +// use this method to poll the operation result at intervals as +// recommended by the API service. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -// Use -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/-` to activate -// auto session mode, which automatically creates a new conversation -// inside a ConverseConversation session. -func (r *ProjectsLocationsDataStoresConversationsService) Converse(name string, googleclouddiscoveryenginev1betaconverseconversationrequest *GoogleCloudDiscoveryengineV1betaConverseConversationRequest) *ProjectsLocationsDataStoresConversationsConverseCall { - c := &ProjectsLocationsDataStoresConversationsConverseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { + c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaconverseconversationrequest = googleclouddiscoveryenginev1betaconverseconversationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsConverseCall { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconverseconversationrequest) + 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 } - reqHeaders.Set("Content-Type", "application/json") + 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.operations.get" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "parameterOrder": [ + // "name" + // ], + // "parameters": { + // "name": { + // "description": "The name of the operation resource.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+name}", + // "response": { + // "$ref": "GoogleLongrunningOperation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "discoveryengine.projects.locations.dataStores.operations.list": + +type ProjectsLocationsDataStoresOperationsListCall 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 *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { + c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list +// filter. +func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list +// page size. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list +// page token. +func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:converse") + 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 } @@ -29059,17 +35559,15 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.converse" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConverseConversationResponse.ServerRe -// sponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConverseConversationResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. +// Exactly one of *GoogleLongrunningListOperationsResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29088,7 +35586,7 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConverseConversationResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29100,28 +35598,41 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } return ret, nil // { - // "description": "Converses a conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}:converse", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.converse", + // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.operations.list", // "parameterOrder": [ // "name" // ], // "parameters": { + // "filter": { + // "description": "The standard list filter.", + // "location": "query", + // "type": "string" + // }, // "name": { - // "description": "Required. The resource name of the Conversation to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/{conversation_id}`. Use `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/conversations/-` to activate auto session mode, which automatically creates a new conversation inside a ConverseConversation session.", + // "description": "The name of the operation's parent resource.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" - // } - // }, - // "path": "v1beta/{+name}:converse", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationRequest" + // }, + // "pageSize": { + // "description": "The standard list page size.", + // "format": "int32", + // "location": "query", + // "type": "integer" + // }, + // "pageToken": { + // "description": "The standard list page token.", + // "location": "query", + // "type": "string" + // } // }, + // "path": "v1beta/{+name}/operations", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConverseConversationResponse" + // "$ref": "GoogleLongrunningListOperationsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29130,34 +35641,64 @@ func (c *ProjectsLocationsDataStoresConversationsConverseCall) Do(opts ...google } -// method id "discoveryengine.projects.locations.dataStores.conversations.create": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresConversationsCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.schemas.create": + +type ProjectsLocationsDataStoresSchemasCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + 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. +// Create: Creates a Schema. // -// - parent: Full resource name of parent data store. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Create(parent string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsCreateCall { - c := &ProjectsLocationsDataStoresConversationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { + c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// SchemaId sets the optional parameter "schemaId": Required. The ID to +// use for the Schema, which will become the final component of the +// Schema.name. This field should conform to RFC-1034 +// (https://tools.ietf.org/html/rfc1034) standard with a length limit of +// 63 characters. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { + c.urlParams_.Set("schemaId", schemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29165,21 +35706,21 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsCreateCall { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29187,14 +35728,14 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29207,16 +35748,14 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.create" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29235,7 +35774,7 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap 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, @@ -29247,28 +35786,33 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } return ret, nil // { - // "description": "Creates a Conversation. If the Conversation to create already exists, an ALREADY_EXISTS error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "description": "Creates a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.conversations.create", + // "id": "discoveryengine.projects.locations.dataStores.schemas.create", // "parameterOrder": [ // "parent" // ], // "parameters": { // "parent": { - // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" + // }, + // "schemaId": { + // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "location": "query", + // "type": "string" // } // }, - // "path": "v1beta/{+parent}/conversations", + // "path": "v1beta/{+parent}/schemas", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29277,9 +35821,9 @@ func (c *ProjectsLocationsDataStoresConversationsCreateCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.delete": +// method id "discoveryengine.projects.locations.dataStores.schemas.delete": -type ProjectsLocationsDataStoresConversationsDeleteCall struct { +type ProjectsLocationsDataStoresSchemasDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29287,14 +35831,13 @@ type ProjectsLocationsDataStoresConversationsDeleteCall 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 Schema. // -// - name: The resource name of the Conversation to delete. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *ProjectsLocationsDataStoresConversationsDeleteCall { - c := &ProjectsLocationsDataStoresConversationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { + c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -29302,7 +35845,7 @@ func (r *ProjectsLocationsDataStoresConversationsService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29310,21 +35853,21 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsDeleteCall { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29347,14 +35890,14 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.delete" call. -// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any -// non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. +// Exactly one of *GoogleLongrunningOperation or error will be non-nil. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29373,7 +35916,7 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap 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, @@ -29385,25 +35928,25 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } return ret, nil // { - // "description": "Deletes a Conversation. If the Conversation to delete does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "description": "Deletes a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.conversations.delete", + // "id": "discoveryengine.projects.locations.dataStores.schemas.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 full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleProtobufEmpty" + // "$ref": "GoogleLongrunningOperation" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29412,9 +35955,9 @@ func (c *ProjectsLocationsDataStoresConversationsDeleteCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.conversations.get": +// method id "discoveryengine.projects.locations.dataStores.schemas.get": -type ProjectsLocationsDataStoresConversationsGetCall struct { +type ProjectsLocationsDataStoresSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -29423,13 +35966,13 @@ type ProjectsLocationsDataStoresConversationsGetCall struct { header_ http.Header } -// Get: Gets a Conversation. +// Get: Gets a Schema. // -// - name: The resource name of the Conversation to get. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}/conversations/{conversation_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *ProjectsLocationsDataStoresConversationsGetCall { - c := &ProjectsLocationsDataStoresConversationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The full resource name of the schema, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}/schemas/{schema}`. +func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { + c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -29437,7 +35980,7 @@ func (r *ProjectsLocationsDataStoresConversationsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29447,7 +35990,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Fields(s ...googleapi. // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { c.ifNoneMatch_ = entityTag return c } @@ -29455,21 +35998,21 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29495,16 +36038,15 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was +// because http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29523,7 +36065,7 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaConversation{ + ret := &GoogleCloudDiscoveryengineV1betaSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29535,25 +36077,25 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } return ret, nil // { - // "description": "Gets a Conversation.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", + // "description": "Gets a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.get", + // "id": "discoveryengine.projects.locations.dataStores.schemas.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 full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29562,9 +36104,9 @@ func (c *ProjectsLocationsDataStoresConversationsGetCall) Do(opts ...googleapi.C } -// method id "discoveryengine.projects.locations.dataStores.conversations.list": +// method id "discoveryengine.projects.locations.dataStores.schemas.list": -type ProjectsLocationsDataStoresConversationsListCall struct { +type ProjectsLocationsDataStoresSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -29573,47 +36115,32 @@ type ProjectsLocationsDataStoresConversationsListCall struct { header_ http.Header } -// List: Lists all Conversations by their parent DataStore. +// List: Gets a list of Schemas. // -// - parent: The data store resource name. Format: -// `projects/{project_number}/locations/{location_id}/collections/{coll -// ection}/dataStores/{data_store_id}`. -func (r *ProjectsLocationsDataStoresConversationsService) List(parent string) *ProjectsLocationsDataStoresConversationsListCall { - c := &ProjectsLocationsDataStoresConversationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent data store resource name, in the format of +// `projects/{project}/locations/{location}/collections/{collection}/da +// taStores/{data_store}`. +func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { + c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": A filter to apply on the -// list results. The supported features are: user_pseudo_id, state. -// Example: "user_pseudo_id = some_id" -func (c *ProjectsLocationsDataStoresConversationsListCall) Filter(filter string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list -// of fields to order by, sorted in ascending order. Use "desc" after a -// field name for descending. Supported fields: * `update_time` * -// `create_time` * `conversation_name` Example: "update_time desc" -// "create_time" -func (c *ProjectsLocationsDataStoresConversationsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresConversationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 50. Max allowed value -// is 1000. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresConversationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number +// of Schemas to return. The service may return fewer than this value. +// If unspecified, at most 100 Schemas will be returned. The maximum +// value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListConversations` call. Provide this to -// retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresConversationsListCall { +// received from a previous SchemaService.ListSchemas call. Provide this +// to retrieve the subsequent page. When paginating, all other +// parameters provided to SchemaService.ListSchemas must match the call +// that provided the page token. +func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -29621,7 +36148,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29631,7 +36158,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { c.ifNoneMatch_ = entityTag return c } @@ -29639,21 +36166,21 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresConversationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsListCall { +func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -29666,7 +36193,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/conversations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29679,17 +36206,16 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListConversationsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He +// ader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListConversationsResponse, error) { +func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29708,7 +36234,7 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListConversationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29720,232 +36246,36 @@ func (c *ProjectsLocationsDataStoresConversationsListCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Lists all Conversations by their parent DataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations", + // "description": "Gets a list of Schemas.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.conversations.list", + // "id": "discoveryengine.projects.locations.dataStores.schemas.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/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+parent}/conversations", - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListConversationsResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresConversationsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListConversationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.conversations.patch": - -type ProjectsLocationsDataStoresConversationsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Conversation. Conversation action type cannot be -// changed. If the Conversation to update does not exist, a NOT_FOUND -// error is returned. -// -// - name: Immutable. Fully qualified name -// `project/*/locations/global/collections/{collection}/dataStore/*/con -// versations/*` or -// `project/*/locations/global/collections/{collection}/engines/*/conve -// rsations/*`. -func (r *ProjectsLocationsDataStoresConversationsService) Patch(name string, googleclouddiscoveryenginev1betaconversation *GoogleCloudDiscoveryengineV1betaConversation) *ProjectsLocationsDataStoresConversationsPatchCall { - c := &ProjectsLocationsDataStoresConversationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googleclouddiscoveryenginev1betaconversation = googleclouddiscoveryenginev1betaconversation - return c -} - -// UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided Conversation to update. The following are NOT -// supported: * Conversation.name If not set or empty, all supported -// fields are updated. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresConversationsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresConversationsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataStoresConversationsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaconversation) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.dataStores.conversations.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaConversation or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaConversation.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaConversation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.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 - // { - // "description": "Updates a Conversation. Conversation action type cannot be changed. If the Conversation to update does not exist, a NOT_FOUND error is returned.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/conversations/{conversationsId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.conversations.patch", - // "parameterOrder": [ - // "name" - // ], - // "parameters": { - // "name": { - // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*` or `project/*/locations/global/collections/{collection}/engines/*/conversations/*`.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/conversations/[^/]+$", - // "required": true, - // "type": "string" + // "pageSize": { + // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", + // "format": "int32", + // "location": "query", + // "type": "integer" // }, - // "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", + // "pageToken": { + // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" - // }, + // "path": "v1beta/{+parent}/schemas", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaConversation" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -29954,79 +36284,103 @@ func (c *ProjectsLocationsDataStoresConversationsPatchCall) Do(opts ...googleapi } -// method id "discoveryengine.projects.locations.dataStores.models.operations.get": +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} -type ProjectsLocationsDataStoresModelsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// method id "discoveryengine.projects.locations.dataStores.schemas.patch": + +type ProjectsLocationsDataStoresSchemasPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Patch: Updates a Schema. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) Get(name string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c := &ProjectsLocationsDataStoresModelsOperationsGetCall{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}/da +// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 +// encoded string with a length limit of 1024 characters. +func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { + c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema + return c +} + +// AllowMissing sets the optional parameter "allowMissing": If set to +// true, and the Schema is not found, a new Schema will be created. In +// this situation, `update_mask` is ignored. +func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsGetCall { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -30037,14 +36391,14 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.get" call. +// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. // Exactly one of *GoogleLongrunningOperation or error will be non-nil. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30075,23 +36429,31 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations/{operationsId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.get", + // "description": "Updates a Schema.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", // "parameterOrder": [ // "name" // ], // "parameters": { + // "allowMissing": { + // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", + // "location": "query", + // "type": "boolean" + // }, // "name": { - // "description": "The name of the operation resource.", + // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // }, // "response": { // "$ref": "GoogleLongrunningOperation" // }, @@ -30102,119 +36464,97 @@ func (c *ProjectsLocationsDataStoresModelsOperationsGetCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.models.operations.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.answer": -type ProjectsLocationsDataStoresModelsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + 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`. +// Answer: Answer query method. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataStoresModelsOperationsService) List(name string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c := &ProjectsLocationsDataStoresModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/*/servingConfigs/default_serving_config`. This field is used to +// identify the serving configuration name, set of models used to make +// the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Answer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresModelsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresModelsOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsAnswerCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:answer") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.models.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.answer" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.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 *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30233,7 +36573,7 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30245,41 +36585,28 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/models/{modelsId}/operations", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.models.operations.list", + // "description": "Answer query method.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:answer", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.answer", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/models/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" - // }, - // "pageSize": { - // "description": "The standard list page size.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "The standard list page token.", - // "location": "query", - // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+servingConfig}:answer", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30288,30 +36615,9 @@ func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Do(opts ...googlea } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.operations.get": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": -type ProjectsLocationsDataStoresOperationsGetCall struct { +type ProjectsLocationsDataStoresServingConfigsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -30320,13 +36626,14 @@ type ProjectsLocationsDataStoresOperationsGetCall struct { header_ http.Header } -// Get: Gets the latest state of a long-running operation. Clients can -// use this method to poll the operation result at intervals as -// recommended by the API service. +// Get: Gets a ServingConfig. Returns a NotFound error if the +// ServingConfig does not exist. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *ProjectsLocationsDataStoresOperationsGetCall { - c := &ProjectsLocationsDataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ServingConfig to get. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { + c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -30334,7 +36641,7 @@ func (r *ProjectsLocationsDataStoresOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30344,7 +36651,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Fields(s ...googleapi.Fie // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -30352,21 +36659,21 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) IfNoneMatch(entityTag str // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30392,14 +36699,16 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.get" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30418,7 +36727,7 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call 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, @@ -30430,25 +36739,25 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations/{operationsId}", + // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.get", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "The name of the operation resource.", + // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/operations/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30457,45 +36766,40 @@ func (c *ProjectsLocationsDataStoresOperationsGetCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.operations.list": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": -type ProjectsLocationsDataStoresOperationsListCall struct { +type ProjectsLocationsDataStoresServingConfigsListCall 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 *ProjectsLocationsDataStoresOperationsService) List(name string) *ProjectsLocationsDataStoresOperationsListCall { - c := &ProjectsLocationsDataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list -// filter. -func (c *ProjectsLocationsDataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsDataStoresOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: Full resource name of the parent resource. Format: +// `projects/{project_number}/locations/{location}/collections/{collect +// ion}/engines/{engine}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { + c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The standard list -// page size. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresOperationsListCall { +// PageSize sets the optional parameter "pageSize": Maximum number of +// results to return. If unspecified, defaults to 100. If a value +// greater than 100 is provided, at most 100 results are returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list -// page token. -func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, +// received from a previous `ListServingConfigs` call. Provide this to +// retrieve the subsequent page. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -30503,7 +36807,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) PageToken(pageToken stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30513,7 +36817,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Fields(s ...googleapi.Fi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { c.ifNoneMatch_ = entityTag return c } @@ -30521,21 +36825,21 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) IfNoneMatch(entityTag st // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresOperationsListCall { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30548,7 +36852,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30556,20 +36860,22 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.operations.list" call. -// Exactly one of *GoogleLongrunningListOperationsResponse or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error +// will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp +// onse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30588,7 +36894,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30600,41 +36906,36 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal } return ret, nil // { - // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/operations", + // "description": "Lists all ServingConfigs linked to this dataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.operations.list", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", // "parameterOrder": [ - // "name" + // "parent" // ], // "parameters": { - // "filter": { - // "description": "The standard list filter.", - // "location": "query", - // "type": "string" - // }, - // "name": { - // "description": "The name of the operation's parent resource.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", - // "required": true, - // "type": "string" - // }, // "pageSize": { - // "description": "The standard list page size.", + // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", // "format": "int32", // "location": "query", // "type": "integer" // }, // "pageToken": { - // "description": "The standard list page token.", + // "description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" + // }, + // "parent": { + // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "required": true, + // "type": "string" // } // }, - // "path": "v1beta/{+name}/operations", + // "path": "v1beta/{+parent}/servingConfigs", // "response": { - // "$ref": "GoogleLongrunningListOperationsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30646,7 +36947,7 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Do(opts ...googleapi.Cal // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -30664,43 +36965,43 @@ func (c *ProjectsLocationsDataStoresOperationsListCall) Pages(ctx context.Contex } } -// method id "discoveryengine.projects.locations.dataStores.schemas.create": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": -type ProjectsLocationsDataStoresSchemasCreateCall struct { - s *Service - parent string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Schema. +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. // -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) Create(parent string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasCreateCall { - c := &ProjectsLocationsDataStoresSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id} +// /engines/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig return c } -// SchemaId sets the optional parameter "schemaId": Required. The ID to -// use for the Schema, which will become the final component of the -// Schema.name. This field should conform to RFC-1034 -// (https://tools.ietf.org/html/rfc1034) standard with a length limit of -// 63 characters. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) SchemaId(schemaId string) *ProjectsLocationsDataStoresSchemasCreateCall { - c.urlParams_.Set("schemaId", schemaId) +// UpdateMask sets the optional parameter "updateMask": Indicates which +// fields in the provided ServingConfig to update. The following are NOT +// supported: * ServingConfig.name If not set, all supported fields are +// updated. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30708,21 +37009,21 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasCreateCall { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30730,34 +37031,36 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) if err != nil { return nil, err } reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.create" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30776,7 +37079,7 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call 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, @@ -30788,33 +37091,34 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Creates a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.schemas.create", + // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "httpMethod": "PATCH", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", // "parameterOrder": [ - // "parent" + // "name" // ], // "parameters": { - // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "name": { + // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // }, - // "schemaId": { - // "description": "Required. The ID to use for the Schema, which will become the final component of the Schema.name. This field should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length limit of 63 characters.", + // "updateMask": { + // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "format": "google-fieldmask", // "location": "query", // "type": "string" // } // }, - // "path": "v1beta/{+parent}/schemas", + // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30823,31 +37127,43 @@ func (c *ProjectsLocationsDataStoresSchemasCreateCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.delete": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": -type ProjectsLocationsDataStoresSchemasDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a Schema. +// Recommend: Makes a recommendation, which requires a contextual user +// event. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Delete(name string) *ProjectsLocationsDataStoresSchemasDeleteCall { - c := &ProjectsLocationsDataStoresSchemasDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: Full resource name of a ServingConfig: +// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ +// *`, or +// `projects/*/locations/global/collections/*/dataStores/*/servingConfi +// gs/*` One default serving config is created along with your +// recommendation engine creation. The engine ID will be used as the +// ID of the default serving config. For example, for Engine +// `projects/*/locations/global/collections/*/engines/my-engine`, you +// can use +// `projects/*/locations/global/collections/*/engines/my-engine/serving +// Configs/my-engine` for your RecommendationService.Recommend +// requests. +func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { + c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30855,21 +37171,21 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Fields(s ...googleapi.Fie // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasDeleteCall { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -30877,29 +37193,36 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) doRequest(alt string) (*h } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.delete" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30918,7 +37241,7 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30930,25 +37253,28 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } return ret, nil // { - // "description": "Deletes a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "DELETE", - // "id": "discoveryengine.projects.locations.dataStores.schemas.delete", + // "description": "Makes a recommendation, which requires a contextual user event.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "servingConfig": { + // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+servingConfig}:recommend", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" + // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -30957,98 +37283,97 @@ func (c *ProjectsLocationsDataStoresSchemasDeleteCall) Do(opts ...googleapi.Call } -// method id "discoveryengine.projects.locations.dataStores.schemas.get": +// method id "discoveryengine.projects.locations.dataStores.servingConfigs.search": -type ProjectsLocationsDataStoresSchemasGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresServingConfigsSearchCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a Schema. +// Search: Performs a search. // -// - name: The full resource name of the schema, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. -func (r *ProjectsLocationsDataStoresSchemasService) Get(name string) *ProjectsLocationsDataStoresSchemasGetCall { - c := &ProjectsLocationsDataStoresSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - servingConfig: The resource name of the Search serving config, such +// as +// `projects/*/locations/global/collections/default_collection/engines/ +// */servingConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStor +// es/default_data_store/servingConfigs/default_serving_config`. This +// field is used to identify the serving configuration name, set of +// models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { + c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasGetCall { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "servingConfig": c.servingConfig, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSchema or error will -// be non-nil. Any non-2xx status code is an error. Response headers are -// in either -// *GoogleCloudDiscoveryengineV1betaSchema.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was -// because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSchema, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or +// error will be non-nil. Any non-2xx status code is an error. Response +// headers are in either +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header +// or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31067,7 +37392,7 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSchema{ + ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31079,25 +37404,28 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } return ret, nil // { - // "description": "Gets a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.get", + // "description": "Performs a search.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.search", // "parameterOrder": [ - // "name" + // "servingConfig" // ], // "parameters": { - // "name": { - // "description": "Required. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.", + // "servingConfig": { + // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+name}", + // "path": "v1beta/{+servingConfig}:search", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" + // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31106,98 +37434,94 @@ func (c *ProjectsLocationsDataStoresSchemasGetCall) Do(opts ...googleapi.CallOpt } -// method id "discoveryengine.projects.locations.dataStores.schemas.list": - -type ProjectsLocationsDataStoresSchemasListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } } -// List: Gets a list of Schemas. -// -// - parent: The parent data store resource name, in the format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}`. -func (r *ProjectsLocationsDataStoresSchemasService) List(parent string) *ProjectsLocationsDataStoresSchemasListCall { - c := &ProjectsLocationsDataStoresSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} +// method id "discoveryengine.projects.locations.dataStores.sessions.create": -// PageSize sets the optional parameter "pageSize": The maximum number -// of Schemas to return. The service may return fewer than this value. -// If unspecified, at most 100 Schemas will be returned. The maximum -// value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDataStoresSessionsCreateCall struct { + s *Service + parent string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, -// received from a previous SchemaService.ListSchemas call. Provide this -// to retrieve the subsequent page. When paginating, all other -// parameters provided to SchemaService.ListSchemas must match the call -// that provided the page token. -func (c *ProjectsLocationsDataStoresSchemasListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSchemasListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Create(parent string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsCreateCall { + c := &ProjectsLocationsDataStoresSessionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets the optional parameter which makes the operation -// fail if the object's ETag matches the given value. This is useful for -// getting updates only after the object has changed since the last -// request. Use googleapi.IsNotModified to check whether the response -// error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSchemasListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasListCall { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsCreateCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/schemas") + urls := 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 } @@ -31208,16 +37532,15 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.list" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaListSchemasResponse -// or error will be non-nil. Any non-2xx status code is an error. -// Response headers are in either -// *GoogleCloudDiscoveryengineV1betaListSchemasResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSchemasResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.create" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsDataStoresSessionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31236,7 +37559,7 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListSchemasResponse{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31248,36 +37571,28 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp } return ret, nil // { - // "description": "Gets a list of Schemas.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas", - // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.schemas.list", + // "description": "Creates a Session. If the Session to create already exists, an ALREADY_EXISTS error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.dataStores.sessions.create", // "parameterOrder": [ // "parent" // ], // "parameters": { - // "pageSize": { - // "description": "The maximum number of Schemas to return. The service may return fewer than this value. If unspecified, at most 100 Schemas will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", - // "format": "int32", - // "location": "query", - // "type": "integer" - // }, - // "pageToken": { - // "description": "A page token, received from a previous SchemaService.ListSchemas call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SchemaService.ListSchemas must match the call that provided the page token.", - // "location": "query", - // "type": "string" - // }, // "parent": { - // "description": "Required. The parent data store resource name, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + // "description": "Required. Full resource name of parent data store. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/schemas", + // "path": "v1beta/{+parent}/sessions", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" + // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListSchemasResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31286,64 +37601,32 @@ func (c *ProjectsLocationsDataStoresSchemasListCall) Do(opts ...googleapi.CallOp } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSchemasResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -// method id "discoveryengine.projects.locations.dataStores.schemas.patch": +// method id "discoveryengine.projects.locations.dataStores.sessions.delete": -type ProjectsLocationsDataStoresSchemasPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Schema. +// Delete: Deletes a Session. If the Session to delete does not exist, a +// NOT_FOUND error is returned. // -// - name: Immutable. The full resource name of the schema, in the -// format of -// `projects/{project}/locations/{location}/collections/{collection}/da -// taStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 -// encoded string with a length limit of 1024 characters. -func (r *ProjectsLocationsDataStoresSchemasService) Patch(name string, googleclouddiscoveryenginev1betaschema *GoogleCloudDiscoveryengineV1betaSchema) *ProjectsLocationsDataStoresSchemasPatchCall { - c := &ProjectsLocationsDataStoresSchemasPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to delete. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Delete(name string) *ProjectsLocationsDataStoresSessionsDeleteCall { + c := &ProjectsLocationsDataStoresSessionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaschema = googleclouddiscoveryenginev1betaschema - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to -// true, and the Schema is not found, a new Schema will be created. In -// this situation, `update_mask` is ignored. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsDataStoresSchemasPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31351,21 +37634,21 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Fields(s ...googleapi.Fiel // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSchemasPatchCall { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsDeleteCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31373,16 +37656,11 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaschema) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -31393,14 +37671,14 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.schemas.patch" call. -// Exactly one of *GoogleLongrunningOperation or error will be non-nil. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.delete" call. +// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any +// non-2xx status code is an error. Response headers are in either +// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was // because http.StatusNotModified was returned. -func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDataStoresSessionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31419,7 +37697,7 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) 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, @@ -31431,33 +37709,25 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } return ret, nil // { - // "description": "Updates a Schema.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/schemas/{schemasId}", - // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.schemas.patch", + // "description": "Deletes a Session. If the Session to delete does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", + // "httpMethod": "DELETE", + // "id": "discoveryengine.projects.locations.dataStores.sessions.delete", // "parameterOrder": [ // "name" // ], // "parameters": { - // "allowMissing": { - // "description": "If set to true, and the Schema is not found, a new Schema will be created. In this situation, `update_mask` is ignored.", - // "location": "query", - // "type": "boolean" - // }, // "name": { - // "description": "Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This field must be a UTF-8 encoded string with a length limit of 1024 characters.", + // "description": "Required. The resource name of the Session to delete. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/schemas/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSchema" - // }, // "response": { - // "$ref": "GoogleLongrunningOperation" + // "$ref": "GoogleProtobufEmpty" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31466,9 +37736,9 @@ func (c *ProjectsLocationsDataStoresSchemasPatchCall) Do(opts ...googleapi.CallO } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.get": +// method id "discoveryengine.projects.locations.dataStores.sessions.get": -type ProjectsLocationsDataStoresServingConfigsGetCall struct { +type ProjectsLocationsDataStoresSessionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -31477,14 +37747,13 @@ type ProjectsLocationsDataStoresServingConfigsGetCall struct { header_ http.Header } -// Get: Gets a ServingConfig. Returns a NotFound error if the -// ServingConfig does not exist. +// Get: Gets a Session. // -// - name: The resource name of the ServingConfig to get. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *ProjectsLocationsDataStoresServingConfigsGetCall { - c := &ProjectsLocationsDataStoresServingConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Session to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}/sessions/{session_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsLocationsDataStoresSessionsGetCall { + c := &ProjectsLocationsDataStoresSessionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -31492,7 +37761,7 @@ func (r *ProjectsLocationsDataStoresServingConfigsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31502,7 +37771,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Fields(s ...googleapi // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsGetCall { c.ifNoneMatch_ = entityTag return c } @@ -31510,21 +37779,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) IfNoneMatch(entityTag // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsGetCall { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31541,25 +37810,24 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) doRequest(alt string) 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.servingConfigs.get" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { + 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.sessions.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsDataStoresSessionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31578,7 +37846,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31590,25 +37858,25 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. } return ret, nil // { - // "description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "description": "Gets a Session.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.get", + // "id": "discoveryengine.projects.locations.dataStores.sessions.get", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config_id}`", + // "description": "Required. The resource name of the Session to get. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // } // }, // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31617,9 +37885,9 @@ func (c *ProjectsLocationsDataStoresServingConfigsGetCall) Do(opts ...googleapi. } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.list": +// method id "discoveryengine.projects.locations.dataStores.sessions.list": -type ProjectsLocationsDataStoresServingConfigsListCall struct { +type ProjectsLocationsDataStoresSessionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -31628,29 +37896,47 @@ type ProjectsLocationsDataStoresServingConfigsListCall struct { header_ http.Header } -// List: Lists all ServingConfigs linked to this dataStore. +// List: Lists all Sessions by their parent DataStore. // -// - parent: Full resource name of the parent resource. Format: -// `projects/{project_number}/locations/{location}/collections/{collect -// ion}/engines/{engine}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) List(parent string) *ProjectsLocationsDataStoresServingConfigsListCall { - c := &ProjectsLocationsDataStoresServingConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The data store resource name. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/dataStores/{data_store_id}`. +func (r *ProjectsLocationsDataStoresSessionsService) List(parent string) *ProjectsLocationsDataStoresSessionsListCall { + c := &ProjectsLocationsDataStoresSessionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": A filter to apply on the +// list results. The supported features are: user_pseudo_id, state. +// Example: "user_pseudo_id = some_id" +func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list +// of fields to order by, sorted in ascending order. Use "desc" after a +// field name for descending. Supported fields: * `update_time` * +// `create_time` * `session_name` Example: "update_time desc" +// "create_time" +func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": Maximum number of -// results to return. If unspecified, defaults to 100. If a value -// greater than 100 is provided, at most 100 results are returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresServingConfigsListCall { +// results to return. If unspecified, defaults to 50. Max allowed value +// is 1000. +func (c *ProjectsLocationsDataStoresSessionsListCall) PageSize(pageSize int64) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, -// received from a previous `ListServingConfigs` call. Provide this to +// received from a previous `ListSessions` call. Provide this to // retrieve the subsequent page. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) PageToken(pageToken string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -31658,7 +37944,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31668,7 +37954,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Fields(s ...googleap // getting updates only after the object has changed since the last // request. Use googleapi.IsNotModified to check whether the response // error from Do is the result of In-None-Match. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsListCall { c.ifNoneMatch_ = entityTag return c } @@ -31676,21 +37962,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) IfNoneMatch(entityTa // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsListCall { +func (c *ProjectsLocationsDataStoresSessionsListCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsListCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31703,7 +37989,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/servingConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/sessions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31716,17 +38002,16 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.list" call. -// Exactly one of -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse or error -// will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaListServingConfigsResponse.ServerResp -// onse.Header or (if a response was returned at all) in +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.list" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaListSessionsResponse +// or error will be non-nil. Any non-2xx status code is an error. +// Response headers are in either +// *GoogleCloudDiscoveryengineV1betaListSessionsResponse.ServerResponse.H +// eader or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse, error) { +func (c *ProjectsLocationsDataStoresSessionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaListSessionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31745,7 +38030,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaListServingConfigsResponse{ + ret := &GoogleCloudDiscoveryengineV1betaListSessionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31757,36 +38042,46 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi } return ret, nil // { - // "description": "Lists all ServingConfigs linked to this dataStore.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs", + // "description": "Lists all Sessions by their parent DataStore.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions", // "httpMethod": "GET", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.list", + // "id": "discoveryengine.projects.locations.dataStores.sessions.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` * `session_name` Example: \"update_time desc\" \"create_time\"", + // "location": "query", + // "type": "string" + // }, // "pageSize": { - // "description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", + // "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": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", + // "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", // "location": "query", // "type": "string" // }, // "parent": { - // "description": "Required. Full resource name of the parent resource. Format: `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`", + // "description": "Required. The data store resource name. Format: `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`", // "location": "path", // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+parent}/servingConfigs", + // "path": "v1beta/{+parent}/sessions", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaListServingConfigsResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaListSessionsResponse" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31798,7 +38093,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Do(opts ...googleapi // Pages invokes f for each page of results. // A non-nil error returned from f will halt the iteration. // The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListServingConfigsResponse) error) error { +func (c *ProjectsLocationsDataStoresSessionsListCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaListSessionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point for { @@ -31816,35 +38111,35 @@ func (c *ProjectsLocationsDataStoresServingConfigsListCall) Pages(ctx context.Co } } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.patch": +// method id "discoveryengine.projects.locations.dataStores.sessions.patch": -type ProjectsLocationsDataStoresServingConfigsPatchCall struct { - s *Service - name string - googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the -// ServingConfig does not exist. +// 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/{location}/collections/{collection_id} -// /engines/{engine_id}/servingConfigs/{serving_config_id}`. -func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1betaservingconfig *GoogleCloudDiscoveryengineV1betaServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { - c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `project/*/locations/global/collections/{collection}/engines/{engine +// }/sessions/*`. +func (r *ProjectsLocationsDataStoresSessionsService) Patch(name string, googleclouddiscoveryenginev1betasession *GoogleCloudDiscoveryengineV1betaSession) *ProjectsLocationsDataStoresSessionsPatchCall { + c := &ProjectsLocationsDataStoresSessionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googleclouddiscoveryenginev1betaservingconfig = googleclouddiscoveryenginev1betaservingconfig + c.googleclouddiscoveryenginev1betasession = googleclouddiscoveryenginev1betasession return c } // UpdateMask sets the optional parameter "updateMask": Indicates which -// fields in the provided ServingConfig to update. The following are NOT -// supported: * ServingConfig.name If not set, all supported fields are -// updated. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { +// fields in the provided Session to update. The following are NOT +// supported: * Session.name If not set or empty, all supported fields +// are updated. +func (c *ProjectsLocationsDataStoresSessionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresSessionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -31852,7 +38147,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31860,21 +38155,21 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googlea // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsPatchCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { @@ -31882,7 +38177,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt strin } reqHeaders.Set("User-Agent", c.s.userAgent()) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaservingconfig) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasession) if err != nil { return nil, err } @@ -31902,16 +38197,15 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaServingConfig or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaServingConfig.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaServingConfig, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.patch" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaSession or error will +// be non-nil. 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 *ProjectsLocationsDataStoresSessionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSession, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31930,7 +38224,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaServingConfig{ + ret := &GoogleCloudDiscoveryengineV1betaSession{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31942,23 +38236,23 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap } return ret, nil // { - // "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + // "description": "Updates a Session. Session action type cannot be changed. If the Session to update does not exist, a NOT_FOUND error is returned.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}", // "httpMethod": "PATCH", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", + // "id": "discoveryengine.projects.locations.dataStores.sessions.patch", // "parameterOrder": [ // "name" // ], // "parameters": { // "name": { - // "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + // "description": "Immutable. Fully qualified name `project/*/locations/global/collections/{collection}/engines/{engine}/sessions/*`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+$", // "required": true, // "type": "string" // }, // "updateMask": { - // "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + // "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", // "format": "google-fieldmask", // "location": "query", // "type": "string" @@ -31966,10 +38260,10 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap // }, // "path": "v1beta/{+name}", // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaServingConfig" + // "$ref": "GoogleCloudDiscoveryengineV1betaSession" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -31978,253 +38272,99 @@ func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleap } -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.recommend": +// method id "discoveryengine.projects.locations.dataStores.sessions.answers.get": -type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataStoresSessionsAnswersGetCall 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 Answer. // -// - servingConfig: Full resource name of a ServingConfig: -// `projects/*/locations/global/collections/*/engines/*/servingConfigs/ -// *`, or -// `projects/*/locations/global/collections/*/dataStores/*/servingConfi -// gs/*` One default serving config is created along with your -// recommendation engine creation. The engine ID will be used as the -// ID of the default serving config. For example, for Engine -// `projects/*/locations/global/collections/*/engines/my-engine`, you -// can use -// `projects/*/locations/global/collections/*/engines/my-engine/serving -// Configs/my-engine` for your RecommendationService.Recommend -// requests. -func (r *ProjectsLocationsDataStoresServingConfigsService) Recommend(servingConfig string, googleclouddiscoveryenginev1betarecommendrequest *GoogleCloudDiscoveryengineV1betaRecommendRequest) *ProjectsLocationsDataStoresServingConfigsRecommendCall { - c := &ProjectsLocationsDataStoresServingConfigsRecommendCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betarecommendrequest = googleclouddiscoveryenginev1betarecommendrequest +// - name: The resource name of the Answer to get. Format: +// `projects/{project_number}/locations/{location_id}/collections/{coll +// ection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id +// }`. +func (r *ProjectsLocationsDataStoresSessionsAnswersService) Get(name string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c := &ProjectsLocationsDataStoresSessionsAnswersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse // for more information. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsRecommendCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. Any -// pending HTTP request will be aborted if the provided context is -// canceled. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsRecommendCall { - c.ctx_ = ctx - return c -} - -// Header returns an http.Header that can be modified by the caller to -// add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) - for k, v := range c.header_ { - reqHeaders[k] = v - } - reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betarecommendrequest) - if err != nil { - return nil, err - } - reqHeaders.Set("Content-Type", "application/json") - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:recommend") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.recommend" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaRecommendResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaRecommendResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsRecommendCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaRecommendResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudDiscoveryengineV1betaRecommendResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil - // { - // "description": "Makes a recommendation, which requires a contextual user event.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.recommend", - // "parameterOrder": [ - // "servingConfig" - // ], - // "parameters": { - // "servingConfig": { - // "description": "Required. Full resource name of a ServingConfig: `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` One default serving config is created along with your recommendation engine creation. The engine ID will be used as the ID of the default serving config. For example, for Engine `projects/*/locations/global/collections/*/engines/my-engine`, you can use `projects/*/locations/global/collections/*/engines/my-engine/servingConfigs/my-engine` for your RecommendationService.Recommend requests.", - // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", - // "required": true, - // "type": "string" - // } - // }, - // "path": "v1beta/{+servingConfig}:recommend", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendRequest" - // }, - // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaRecommendResponse" - // }, - // "scopes": [ - // "https://www.googleapis.com/auth/cloud-platform" - // ] - // } - -} - -// method id "discoveryengine.projects.locations.dataStores.servingConfigs.search": - -type ProjectsLocationsDataStoresServingConfigsSearchCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Search: Performs a search. -// -// - servingConfig: The resource name of the Search serving config, such -// as -// `projects/*/locations/global/collections/default_collection/engines/ -// */servingConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStor -// es/default_data_store/servingConfigs/default_serving_config`. This -// field is used to identify the serving configuration name, set of -// models used to make the search. -func (r *ProjectsLocationsDataStoresServingConfigsService) Search(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsDataStoresServingConfigsSearchCall { - c := &ProjectsLocationsDataStoresServingConfigsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse -// for more information. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsSearchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IfNoneMatch sets the optional parameter which makes the operation +// fail if the object's ETag matches the given value. This is useful for +// getting updates only after the object has changed since the last +// request. Use googleapi.IsNotModified to check whether the response +// error from Do is the result of In-None-Match. +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataStoresSessionsAnswersGetCall { + c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. Any // pending HTTP request will be aborted if the provided context is // canceled. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsSearchCall { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Context(ctx context.Context) *ProjectsLocationsDataStoresSessionsAnswersGetCall { c.ctx_ = ctx return c } // Header returns an http.Header that can be modified by the caller to // add HTTP headers to the request. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Header() http.Header { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataStoresSessionsAnswersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := make(http.Header) reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) for k, v := range c.header_ { reqHeaders[k] = v } reqHeaders.Set("User-Agent", c.s.userAgent()) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) - if err != nil { - return nil, err + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } - reqHeaders.Set("Content-Type", "application/json") + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "servingConfig": c.servingConfig, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.search" call. -// Exactly one of *GoogleCloudDiscoveryengineV1betaSearchResponse or -// error will be non-nil. Any non-2xx status code is an error. Response -// headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header -// or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +// Do executes the "discoveryengine.projects.locations.dataStores.sessions.answers.get" call. +// Exactly one of *GoogleCloudDiscoveryengineV1betaAnswer or error will +// be non-nil. 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 *ProjectsLocationsDataStoresSessionsAnswersGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswer, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32243,7 +38383,7 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswer{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32255,28 +38395,25 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea } return ret, nil // { - // "description": "Performs a search.", - // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:search", - // "httpMethod": "POST", - // "id": "discoveryengine.projects.locations.dataStores.servingConfigs.search", + // "description": "Gets a Answer.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/sessions/{sessionsId}/answers/{answersId}", + // "httpMethod": "GET", + // "id": "discoveryengine.projects.locations.dataStores.sessions.answers.get", // "parameterOrder": [ - // "servingConfig" + // "name" // ], // "parameters": { - // "servingConfig": { - // "description": "Required. The resource name of the Search serving config, such as `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`, or `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving configuration name, set of models used to make the search.", + // "name": { + // "description": "Required. 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}`", // "location": "path", - // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + // "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/sessions/[^/]+/answers/[^/]+$", // "required": true, // "type": "string" // } // }, - // "path": "v1beta/{+servingConfig}:search", - // "request": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequest" - // }, + // "path": "v1beta/{+name}", // "response": { - // "$ref": "GoogleCloudDiscoveryengineV1betaSearchResponse" + // "$ref": "GoogleCloudDiscoveryengineV1betaAnswer" // }, // "scopes": [ // "https://www.googleapis.com/auth/cloud-platform" @@ -32285,27 +38422,6 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Do(opts ...googlea } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) // reset paging to original point - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken - } -} - // method id "discoveryengine.projects.locations.dataStores.siteSearchEngine.disableAdvancedSiteSearch": type ProjectsLocationsDataStoresSiteSearchEngineDisableAdvancedSiteSearchCall struct { @@ -34454,6 +40570,153 @@ func (c *ProjectsLocationsDataStoresUserEventsWriteCall) Do(opts ...googleapi.Ca } +// method id "discoveryengine.projects.locations.groundingConfigs.check": + +type ProjectsLocationsGroundingConfigsCheckCall struct { + s *Service + groundingConfig string + googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Check: Performs a grounding check. +// +// - groundingConfig: The resource name of the grounding config, such as +// `projects/*/locations/global/groundingConfigs/default_grounding_conf +// ig`. +func (r *ProjectsLocationsGroundingConfigsService) Check(groundingConfig string, googleclouddiscoveryenginev1betacheckgroundingrequest *GoogleCloudDiscoveryengineV1betaCheckGroundingRequest) *ProjectsLocationsGroundingConfigsCheckCall { + c := &ProjectsLocationsGroundingConfigsCheckCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.groundingConfig = groundingConfig + c.googleclouddiscoveryenginev1betacheckgroundingrequest = googleclouddiscoveryenginev1betacheckgroundingrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Fields(s ...googleapi.Field) *ProjectsLocationsGroundingConfigsCheckCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. Any +// pending HTTP request will be aborted if the provided context is +// canceled. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Context(ctx context.Context) *ProjectsLocationsGroundingConfigsCheckCall { + c.ctx_ = ctx + return c +} + +// Header returns an http.Header that can be modified by the caller to +// add HTTP headers to the request. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGroundingConfigsCheckCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := make(http.Header) + reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) + for k, v := range c.header_ { + reqHeaders[k] = v + } + reqHeaders.Set("User-Agent", c.s.userAgent()) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betacheckgroundingrequest) + if err != nil { + return nil, err + } + reqHeaders.Set("Content-Type", "application/json") + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+groundingConfig}:check") + 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{ + "groundingConfig": c.groundingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.groundingConfigs.check" call. +// Exactly one of +// *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse or error will +// be non-nil. Any non-2xx status code is an error. Response headers are +// in either +// *GoogleCloudDiscoveryengineV1betaCheckGroundingResponse.ServerResponse +// .Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGroundingConfigsCheckCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaCheckGroundingResponse, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudDiscoveryengineV1betaCheckGroundingResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a grounding check.", + // "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/groundingConfigs/{groundingConfigsId}:check", + // "httpMethod": "POST", + // "id": "discoveryengine.projects.locations.groundingConfigs.check", + // "parameterOrder": [ + // "groundingConfig" + // ], + // "parameters": { + // "groundingConfig": { + // "description": "Required. The resource name of the grounding config, such as `projects/*/locations/global/groundingConfigs/default_grounding_config`.", + // "location": "path", + // "pattern": "^projects/[^/]+/locations/[^/]+/groundingConfigs/[^/]+$", + // "required": true, + // "type": "string" + // } + // }, + // "path": "v1beta/{+groundingConfig}:check", + // "request": { + // "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingRequest" + // }, + // "response": { + // "$ref": "GoogleCloudDiscoveryengineV1betaCheckGroundingResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + // method id "discoveryengine.projects.locations.operations.get": type ProjectsLocationsOperationsGetCall struct {